This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: case-sensitiveness of environment problem


On Mon, Apr 16, 2001 at 10:17:28AM +0400, egor duda wrote:
>Hi!
>
>  if cygwin environment contains both 'Path' and 'PATH', creating
>windows environment from it causes crash due to reallocating memory
>object which is externally referenced. this patch fixes that.
>
>i feel that we need a bit more tweaking with environment to deal with
>it case-insensitiveness under win32.

I don't think that this is due to case insensitivity as much as someone
supplying a non-malloced PATH string.

Your patch doesn't look right, since it is storing the environ string in
an alloca'ed buffer.  Since alloca is stack based, won't the buffer be
overwritten once the function returns?

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]