www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/03/15/12:30:07

Date: Sun, 15 Mar 1998 19:27:05 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Martin Stromberg <Martin DOT Stromberg AT lu DOT erisoft DOT se>
cc: djgpp-workers AT delorie DOT com
Subject: Re: Where to get the latest sources for djtar
In-Reply-To: <199803151700.SAA03133@propus.lu.erisoft.se>
Message-ID: <Pine.SUN.3.91.980315192316.11036A-100000@is>
MIME-Version: 1.0

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 -


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