- fixed some potential bugs introduced when replacing strncpy and

strncat by strlcpy and strlcat
This commit is contained in:
zolliker
2010-04-14 08:46:17 +00:00
parent 1c558e7f6c
commit 9690db1c3d
10 changed files with 20 additions and 20 deletions

View File

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