make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Minor patch to correct buffer overrun


From: Chris Sutcliffe
Subject: Re: Minor patch to correct buffer overrun
Date: Thu, 19 Aug 2010 11:02:39 -0400

On 19 August 2010 10:35, Chris Sutcliffe wrote:
> 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.

Ugh, man do I feel stupid.  The ultimate source of the issue is this
line in config.h:

/* Define to the character that separates directories in PATH. */
#define PATH_SEPARATOR_CHAR ':'

As a result of this, vpath isn't parsing correctly.  Is there a way to
have configure set PATH_SEPARATOR to ';' for a mingw32 host
irregardless of the shell used to run configure?

Sorry for wasting everybody's time.

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d



reply via email to

[Prev in Thread] Current Thread [Next in Thread]