mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-10 14:02:43 +00:00
Fix buffer overflow bug in NgSendAsciiMsg().
This commit is contained in:
parent
7d664a2f47
commit
7273f8bc17
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61188
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user