Dmitry Timoshkov schrieb:
"Peter Beutner" p.beutner@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?