- fixed some potential bugs introduced when replacing strncpy and
strncat by strlcpy and strlcat
This commit is contained in:
6
help.c
6
help.c
@ -43,9 +43,9 @@ static FILE *findHelpFile(char *name)
|
||||
|
||||
pPtr = helpDirs;
|
||||
while ((pPtr = stptok(pPtr, dir, 131, PATHSEP)) != NULL) {
|
||||
strcpy(pBueffel, dir);
|
||||
strcat(pBueffel, DIRSEP);
|
||||
strlcat(pBueffel, name, (254 - strlen(pBueffel)));
|
||||
strlcpy(pBueffel, dir, sizeof pBueffel);
|
||||
strlcat(pBueffel, DIRSEP, sizeof pBueffel);
|
||||
strlcat(pBueffel, name, sizeof pBueffel);
|
||||
fd = fopen(pBueffel, "r");
|
||||
if (fd != NULL) {
|
||||
return fd;
|
||||
|
Reference in New Issue
Block a user