- fixed some potential bugs introduced when replacing strncpy and
strncat by strlcpy and strlcat
This commit is contained in:
@@ -87,7 +87,7 @@ void WriteToCommandLogId(char *prompt, int id, char *text)
|
||||
pCopy = malloc(l + 1);
|
||||
if (pCopy == NULL)
|
||||
return;
|
||||
strlcpy(pCopy, text, l);
|
||||
strncpy(pCopy, text, l); /* strlcpy is not correct here */
|
||||
pCopy[l] = '\0';
|
||||
if (prompt == cmdPrompt && iCompact) {
|
||||
pPtr = strstr(pCopy, "fulltransact ");
|
||||
|
||||
Reference in New Issue
Block a user