From: Todd C. Miller Date: Mon, 7 Sep 1998 02:41:33 +0000 (+0000) Subject: use NAMLEN() macro X-Git-Tag: SUDO_1_5_6~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1c5148c341b70ac5cac75a18e0e7c71b800a1b0;p=sudo use NAMLEN() macro --- diff --git a/parse.c b/parse.c index be6c6bbf3..27f42a37b 100644 --- a/parse.c +++ b/parse.c @@ -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);