www.delorie.com/djgpp/bugs/show.cgi   search  
Bug 000045

When Created: 12/24/1995 16:00:51
Against DJGPP version: 2.00.beta3
By whom: tor@crec.mipt.ru
Abstract: Invalid argv[0] (sometimes)
In file crt1.c:
When you set up an environment variables (__dos_argv0),
you use a reference to alloca'ed pointer, and use it
later, after return from this function.
Due to this bug later, in __crt0_setup_arguments (in argv0 setup)
attempt to strncat to too small buffer.

Need to change:
at the end of function 
setup_environment(void) in crt1.c
string
  __dos_argv0 = cp + 3;
- may be, malloc it.

Fixed in version 2.00.beta5 on 01/23/1996 21:57:08
By whom: dj@delorie.com



  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010