[PATCH] kernel32: return copy of environment block inGetEnvironmentStringsW

Peter Beutner p.beutner at gmx.net
Wed Apr 4 14:28:05 CDT 2007

Dmitry Timoshkov schrieb:
> "Peter Beutner" <p.beutner at gmx.net> wrote:
>> Make behaviour consistent with GetEnvironmentStringsA.
>> Prevents crash for confused applications which first call
>> GetEnvironmentStringsW and then want to free it with
>> FreeEnvironmentStringsA.
> This patch is wrong:
> http://blogs.msdn.com/matt_pietrek/archive/2004/08/25/220330.aspx
thx for the info. Hadn't thought that they would implement this
inconsistent behaviour between the A/W variants :/.

> Probably an exception handler should be added inside of RtlFreeHeap
> instead.
hm, i vaguely remember reading here that it was prefered not to cover up
crashes produced by passing invalid pointers, unless absolutely necessary.
And here we can fix that nicely in some other way.
See attached patch. Would that be acceptable as well?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_FreeEnvironmentStringsA.patch
Type: text/x-patch
Size: 491 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20070404/cbba0360/fix_FreeEnvironmentStringsA.bin

More information about the wine-devel mailing list