Mail Archives: djgpp-workers/1996/07/28/02:27:32
Currently, the function that allocates space off the transfer buffer
(`talloc' on `src/libc/dos/process/dosexec.c) doesn't check if the
transfer buffer space was exhausted, and will happily overwrite DOS memory
if e.g. your environment size (or the command line) is sufficiently
large. There are two ways of repairing this:
* detect when all the buffer space has been used up, and return
with -1 and errno = ENOMEM.
* as above, but when the transfer buffer is exhausted, allocate
larger buffer in low memory and use that to pass the parameters, then
deallocate it when the child returns.
The second option of course adds to the size and complexity of the code,
so I wonder if it's worth the hassle (I have it written, btw) and would
appreciate any comments before I decide which version to submit. Thanks.
- Raw text -