Well, it's always a bad idea to introduce new bugs when trying to fix
one... strncat(3) takes a string as its second arg, and a len as its third one, not the other way round. =:-) The ``consistency'' of the C library sucks, of course.
This commit is contained in:
parent
b85e95f56a
commit
51b8ca739a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=11573
@ -45,7 +45,7 @@
|
||||
/* Append the <CR><LF> */
|
||||
- (void)strcat(message, "\r\n");
|
||||
+ len -= strlen(message);
|
||||
+ (void)strncat(message, len, "\r\n");
|
||||
+ (void)strncat(message, "\r\n", len);
|
||||
|
||||
/* Send the message to the client */
|
||||
(void)fputs(message,p->output);
|
||||
|
Loading…
Reference in New Issue
Block a user