From 9c2afd99ae73180c14084c270d8e5d4af766a107 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 25 Nov 2012 08:12:54 -0500 Subject: [PATCH] Avoid NULL deref for unknown Defaults in strict mode. --HG-- branch : 1.8 --- plugins/sudoers/visudo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sudoers/visudo.c b/plugins/sudoers/visudo.c index 55c57fdd5..11617099d 100644 --- a/plugins/sudoers/visudo.c +++ b/plugins/sudoers/visudo.c @@ -840,7 +840,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 { -- 2.40.0