use NAMLEN() macro
This commit is contained in:
2
parse.c
2
parse.c
@@ -293,7 +293,7 @@ int command_matches(cmnd, user_args, path, sudoers_args)
|
|||||||
|
|
||||||
while ((dent = readdir(dirp)) != NULL) {
|
while ((dent = readdir(dirp)) != NULL) {
|
||||||
/* ignore paths > MAXPATHLEN (XXX - log) */
|
/* ignore paths > MAXPATHLEN (XXX - log) */
|
||||||
if (plen + strlen(dent->d_name) >= sizeof(buf))
|
if (plen + NAMLEN(dent) >= sizeof(buf))
|
||||||
continue;
|
continue;
|
||||||
strcpy(buf, path);
|
strcpy(buf, path);
|
||||||
strcat(buf, dent->d_name);
|
strcat(buf, dent->d_name);
|
||||||
|
Reference in New Issue
Block a user