From 7273f8bc176db948f354a261a7d72271929893e7 Mon Sep 17 00:00:00 2001 From: Archie Cobbs Date: Fri, 2 Jun 2000 21:51:36 +0000 Subject: [PATCH] Fix buffer overflow bug in NgSendAsciiMsg(). --- lib/libnetgraph/msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libnetgraph/msg.c b/lib/libnetgraph/msg.c index ece1787f2b7e..bae4743e5a50 100644 --- a/lib/libnetgraph/msg.c +++ b/lib/libnetgraph/msg.c @@ -115,7 +115,7 @@ NgSendAsciiMsg(int cs, const char *path, const char *fmt, ...) /* Get a bigger buffer to hold inner message header plus arg string */ if ((ascii = malloc(sizeof(struct ng_mesg) - + strlen(buf) + 1)) == NULL) { + + strlen(args) + 1)) == NULL) { free(buf); return (-1); }