Re: Minor patch to correct buffer overrun

Chris Sutcliffe <[email protected]>
Newsgroups gmane.comp.gnu.make.windows
Message-ID <[email protected]>
Hi Eli,

On 19 August 2010 05:56, Eli Zaretskii wrote:
> Looks like somehow we call find_directory with a list of directories
> from VPATH or vpath.  If you can find which function issues such a
> strange call, please tell.  Failing that, I will take a look soon, as
> this sounds like some bug: it's clear that the call to stat in
> find_directory will always fail for such "file names", so there's no
> point in making such calls.

I've found where it's coming from.  It turns out dir_name() is calling
find_directory() and it's actually construct_vpath_list() that is the
source of the issue.  In particular this block of code (starting at
line 262 of vpath.c):

      /* Put the directory on the vpath list.  */
      if (len > 1 || *v != '.')
	{
          vpath[elem++] = dir_name (strcache_add_len (v, len));
          if (len > maxvpath)
            maxvpath = len;
	}

I haven't had a chance to look at this code in context, so I'm not
sure what the issue is yet, but I figured I'd give you the heads up.

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.