]> granicus.if.org Git - sudo/commitdiff
Avoid NULL deref for unknown Defaults in strict mode.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 25 Nov 2012 13:12:54 +0000 (08:12 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 25 Nov 2012 13:12:54 +0000 (08:12 -0500)
plugins/sudoers/visudo.c

index ba8c5938e461eb18d50579c0de6c297dab4cf920..f7893c031aead54856f04d30421e9da336214026 100644 (file)
@@ -834,7 +834,7 @@ check_syntax(char *sudoers_path, bool quiet, bool strict, bool oldperms)
            if (errorlineno != -1)
                (void) printf(_("parse error in %s near line %d\n"),
                    errorfile, errorlineno);
-           else
+           else if (errorfile != NULL)
                (void) printf(_("parse error in %s\n"), errorfile);
        }
     } else {