]> granicus.if.org Git - sudo/commitdiff
use NAMLEN() macro
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 7 Sep 1998 02:41:33 +0000 (02:41 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 7 Sep 1998 02:41:33 +0000 (02:41 +0000)
parse.c

diff --git a/parse.c b/parse.c
index be6c6bbf33cbcc4ebe96115278e61a32fbcb20b0..27f42a37b76a85eaee13b29ca55b7e363e2c549b 100644 (file)
--- 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);