Mail Archives: djgpp-workers/1998/03/15/12:30:07
Note that I have removed the DJGPP list from the addresses. Patches
should be sent to DJ Delorie <dj AT delorie DOT com> and to the djgpp-workers
list <djgpp-workers AT delorie DOT com>.
On Sun, 15 Mar 1998, Martin Stromberg wrote:
> r = mkdir (n, 0777);
> if (r)
> + {
> + if(errno == ENOENT)
> + {
> + Fatal("Unable to create directory");
> + }
> r = change(n, "Unable to create directory", 1);
> + }
This doesn't seem right. If we want to protect djtar from stack overrun,
lets' just look out for the length of the name to be more than PATH_MAX
and abort with a specific message.
If you are solving here a problem other than the stack overrun, then what
is the problem, exactly?
Testing for ENOENT is likely to backfire, as DOS makes libc functions
generate ENOENT in too many cases.
- Raw text -