Mail Archives: djgpp-workers/1997/07/08/02:40:06
On Mon, 7 Jul 1997, Molnar Laszlo wrote:
> if (!shell)
> shell = command_com;
>
> like in _shell_command(), because _is_unixy_shell() can receive
> a NULL pointer which list_member() will dereference, if there is no
> SHELL or COMSPEC environment variable
Here's the necessary patch:
*** src/libc/ansi/stdlib/system.c~0 Fri Sep 27 02:24:50 1996
--- src/libc/ansi/stdlib/system.c Tue Jul 8 09:09:08 1997
*************** system (const char *cmdline)
*** 502,507 ****
--- 502,509 ----
shell = getenv ("SHELL");
if (!shell)
shell = comspec;
+ if (!shell)
+ shell = command_com;
/* Special case: NULL means just exec the command interpreter. */
if (cmdline == 0)
- Raw text -