mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-01-30 19:24:07 +00:00
[SV 49116] Check potential null pointer dereference.
* w32/subproc/sub_proc.c (make_command_line): Simplify cygwin shell check for correctness.
This commit is contained in:
parent
9c487cc537
commit
3d7c17c5a9
1 changed files with 3 additions and 3 deletions
|
@ -1212,15 +1212,15 @@ make_command_line( char *shell_name, char *full_exec_path, char **argv)
|
|||
unsigned int bytes_required = 0;
|
||||
char* command_line;
|
||||
char* command_line_i;
|
||||
int cygwin_mode = 0; /* HAVE_CYGWIN_SHELL */
|
||||
int have_sh = 0; /* HAVE_CYGWIN_SHELL */
|
||||
int cygwin_mode = 0; /* HAVE_CYGWIN_SHELL */
|
||||
|
||||
#ifdef HAVE_CYGWIN_SHELL
|
||||
have_sh = (shell_name != NULL || strstr(full_exec_path, "sh.exe"));
|
||||
cygwin_mode = 1;
|
||||
#endif
|
||||
|
||||
if (shell_name && full_exec_path) {
|
||||
have_sh = cygwin_mode && strstr(full_exec_path, "sh.exe");
|
||||
bytes_required
|
||||
= strlen(shell_name) + 1 + strlen(full_exec_path);
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue