use NAMLEN() macro

This commit is contained in:
Todd C. Miller
1998-09-07 02:41:33 +00:00
parent e7a1cc6b69
commit a1c5148c34

View File

@@ -293,7 +293,7 @@ int command_matches(cmnd, user_args, path, sudoers_args)
while ((dent = readdir(dirp)) != NULL) {
/* ignore paths > MAXPATHLEN (XXX - log) */
if (plen + strlen(dent->d_name) >= sizeof(buf))
if (plen + NAMLEN(dent) >= sizeof(buf))
continue;
strcpy(buf, path);
strcat(buf, dent->d_name);