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

2009-01-29 Thread Alexandre Julliard
Aurimas Fišeras writes: > But what about this and similar situations? There's no single answer, each situation is different, you have to study the code flow to understand what can and cannot happen. > What should I do? > 1. change get_process_exe_module() to > return LIST_ENTRY( ptr, stru

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

2009-01-28 Thread Aurimas Fišeras
Alexandre Julliard wrote: > Aurimas Fišeras writes: > > >> How to know when to fix NULL pointer dereferences if in most such cases >> code flow can be traced back to a windows API called by "other program"? > > If some other program is really calling it with NULL then you can fix > it. You can'

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

2009-01-27 Thread Alexandre Julliard
Aurimas Fišeras writes: > If FunctionA calls FunctionW with (possibly) NULL pointer and FunctionW > dereferences it we should fix FunctionA? If FunctionW requires a valid pointer, then yes of course the caller should be fixed. Just making FunctionW return NOACCESS instead of crashing doesn't fix

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

2009-01-27 Thread Aurimas Fišeras
Alexandre Julliard wrote: > Aurimas Fišeras writes: > >> Alexandre Julliard wrote: >>> We only want it when an actual app depends on it, otherwise we'd have to >>> add exception handlers in all functions. Note that the Windows behavior >>> often varies across versions too. >>> >> So why are we fi

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

2009-01-27 Thread Alexandre Julliard
Aurimas Fišeras writes: > Alexandre Julliard wrote: >> We only want it when an actual app depends on it, otherwise we'd have to >> add exception handlers in all functions. Note that the Windows behavior >> often varies across versions too. >> > So why are we fixing various "Possible NULL pointer

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

2009-01-27 Thread Aurimas Fišeras
Alexandre Julliard wrote: > Aurimas Fišeras writes: > >> Alexandre Julliard wrote: >>> 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 patc

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

2009-01-27 Thread Alexandre Julliard
Aurimas Fišeras writes: > Alexandre Julliard wrote: >> 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,

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

2009-01-27 Thread Aurimas Fišeras
Alexandre Julliard wrote: > Rob Shearman writes: > >> 2009/1/26 Aurimas Fišeras : >>> 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:

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

2009-01-27 Thread Alexandre Julliard
Rob Shearman writes: > 2009/1/26 Aurimas Fišeras : >> 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 po

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

2009-01-27 Thread Rob Shearman
2009/1/26 Aurimas Fišeras : > 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 RegSetValueE