From: Todd C. Miller Date: Tue, 27 Apr 2010 01:38:43 +0000 (-0400) Subject: Add missing check for NULL in validate_env_vars X-Git-Tag: SUDO_1_8_0~692 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac06e777fa169219a0586c2edff93e4b064582f3;p=sudo Add missing check for NULL in validate_env_vars --- diff --git a/plugins/sudoers/env.c b/plugins/sudoers/env.c index 6e646410d..7a1777766 100644 --- a/plugins/sudoers/env.c +++ b/plugins/sudoers/env.c @@ -750,6 +750,9 @@ validate_env_vars(char * const env_vars[]) size_t len, blen = 0, bsize = 0; int okvar; + if (env_vars == NULL) + return; + /* Add user-specified environment variables. */ for (ep = env_vars; *ep != NULL; ep++) { if (def_secure_path && !user_is_exempt() &&