Fix buffer overflow bug in NgSendAsciiMsg().

This commit is contained in:
archie 2000-06-02 21:51:36 +00:00
parent 6716ee051a
commit 9f245c92a7

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