From a1c5148c341b70ac5cac75a18e0e7c71b800a1b0 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 7 Sep 1998 02:41:33 +0000 Subject: [PATCH] use NAMLEN() macro --- parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.40.0