advapi32: Fix potential NULL pointer dereference in RegSetValueExA [with test] (Saturn)

Alexandre Julliard julliard at winehq.org
Tue Jan 27 05:34:01 CST 2009


Rob Shearman <robertshearman at gmail.com> writes:

> 2009/1/26 Aurimas Fišeras <aurimas at 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.

Of course Windows has exception handlers all over the place, but that
doesn't mean we want to replicate that behavior.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list