mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-02-07 06:47:52 +00:00
* 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:
parent
958ea92eb8
commit
295a05fbd6
1 changed files with 7 additions and 6 deletions
|
@ -441,13 +441,14 @@ process_begin(
|
||||||
/* Use the Makefile's value of PATH to look for the program to
|
/* Use the Makefile's value of PATH to look for the program to
|
||||||
execute, because it could be different from Make's PATH
|
execute, because it could be different from Make's PATH
|
||||||
(e.g., if the target sets its own value. */
|
(e.g., if the target sets its own value. */
|
||||||
for (ep = envp; ep; ep++) {
|
if (envp)
|
||||||
if (strncmp (*ep, "PATH=", 5) == 0
|
for (ep = envp; *ep; ep++) {
|
||||||
|| strncmp (*ep, "Path=", 5) == 0) {
|
if (strncmp (*ep, "PATH=", 5) == 0
|
||||||
path_var = *ep + 5;
|
|| strncmp (*ep, "Path=", 5) == 0) {
|
||||||
break;
|
path_var = *ep + 5;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
exec_handle = find_file(exec_path, path_var,
|
exec_handle = find_file(exec_path, path_var,
|
||||||
exec_fname, sizeof(exec_fname));
|
exec_fname, sizeof(exec_fname));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue