Date: Tue, 8 Jul 1997 09:39:13 +0300 (IDT) From: Eli Zaretskii To: Molnar Laszlo cc: DJGPP Workers Subject: Re: bug in system() In-Reply-To: <33C0F8C3.2F2F4CB4@cdata.tvnet.hu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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)