Fix buffer overflow bug in NgSendAsciiMsg().

This commit is contained in:
Archie Cobbs 2000-06-02 21:51:36 +00:00
parent 7d664a2f47
commit 7273f8bc17
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61188

View File

@ -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);
}