summaryrefslogtreecommitdiffstats
path: root/lib/libnetgraph
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>2000-06-02 21:51:36 +0000
committerarchie <archie@FreeBSD.org>2000-06-02 21:51:36 +0000
commit9f245c92a7b6b00748f079f74b9ef2703435d187 (patch)
tree19608def9101830c12349ab19cbb263a6771289a /lib/libnetgraph
parent6716ee051a620697b69c55807eba165377f952f8 (diff)
downloadFreeBSD-src-9f245c92a7b6b00748f079f74b9ef2703435d187.zip
FreeBSD-src-9f245c92a7b6b00748f079f74b9ef2703435d187.tar.gz
Fix buffer overflow bug in NgSendAsciiMsg().
Diffstat (limited to 'lib/libnetgraph')
-rw-r--r--lib/libnetgraph/msg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libnetgraph/msg.c b/lib/libnetgraph/msg.c
index ece1787..bae4743 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);
}
OpenPOWER on IntegriCloud