From: Eli Zaretskii Date: Wed, 7 Jun 2017 05:32:35 +0000 (+0300) Subject: Avoid crashes when SHELL=abcde is specified on the command line X-Git-Tag: 4.2.90~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66a9b5c3ba4f94342ed1c17cdeb0bbd9df88f72d;p=thirdparty%2Fmake.git Avoid crashes when SHELL=abcde is specified on the command line * variable.c (do_variable_definition): If $SHELL was not found, process "SHELL=foo" as any other variable definition. This avoids segfaults when SHELL=foo is specified on the Make command line. Reported by Orgad Shaneh . --- diff --git a/variable.c b/variable.c index ca66ecd7..364774f0 100644 --- a/variable.c +++ b/variable.c @@ -1404,6 +1404,11 @@ do_variable_definition (const floc *flocp, const char *varname, } } else + v = NULL; + + /* If not $SHELL, or if $SHELL points to a program we didn't find, + just process this variable "as usual". */ + if (!v) #endif /* If we are defining variables inside an $(eval ...), we might have a