delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/07/07/11:45:08

Sender: ml AT delorie DOT com
Message-ID: <33C0F8C3.2F2F4CB4@cdata.tvnet.hu>
Date: Mon, 07 Jul 1997 16:10:11 +0200
From: Molnar Laszlo <molnarl AT cdata DOT tvnet DOT hu>
MIME-Version: 1.0
To: DJGPP Workers <djgpp-workers AT delorie DOT com>
Subject: bug in system()

Hi Workers!

There is a little bug in system():

  if (sys_flags & __system_use_shell)
    shell = getenv ("SHELL");
  if (!shell)
    shell = comspec;

After this there should be an

  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 (this is the case in a perl
test script).

bye, Laszlo


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019