Alexandre Julliard wrote: > Rob Shearman <robertshear...@gmail.com> writes: > >> 2009/1/26 Aurimas Fišeras <auri...@gmail.com>: >>> Saturn's error report: >>> (INCONSISTENT USE) Possible null dereference of variable data+(count-1). >>> This variable is checked for Null at lines: registry.c:1051 >>> >>> Tested on Windows XP >>> >>> Changelog: >>> advapi32: Fix potential NULL pointer dereference in RegSetValueExA >>> [with test] (Saturn) >> Excellent, this tool has spotted a corner-case that the code doesn't >> handle correctly. > > I'm not convinced that this is really a bug. If a non-zero count is > specified it's quite reasonable to expect data to be valid.
It is also quite reasonable to expect that a function won't crash with all legal parameters. > > Of course Windows has exception handlers all over the place, but that > doesn't mean we want to replicate that behavior. But we want to have a "bug-for-bug" compatibility with Windows? Without this patch windows just returns an error, while wine crashes. There are dozens of similar corner-case errors where Windows crashes as well as wine, but this time only wine crashes.