* w32/subproc/sub_proc.c (process_begin): Check *ep non-NULL

inside the loop that looks up environment for PATH.
This commit is contained in:
Eli Zaretskii 2009-09-14 18:18:37 +00:00
parent 958ea92eb8
commit 295a05fbd6

View file

@ -441,7 +441,8 @@ process_begin(
/* Use the Makefile's value of PATH to look for the program to
execute, because it could be different from Make's PATH
(e.g., if the target sets its own value. */
for (ep = envp; ep; ep++) {
if (envp)
for (ep = envp; *ep; ep++) {
if (strncmp (*ep, "PATH=", 5) == 0
|| strncmp (*ep, "Path=", 5) == 0) {
path_var = *ep + 5;