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
t;>> >>> 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 co

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

2009-01-27 Thread Alexandre Julliard
> 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-zer

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

2009-01-27 Thread Rob Shearman
l NULL pointer dereference in RegSetValueExA > [with test] (Saturn) Excellent, this tool has spotted a corner-case that the code doesn't handle correctly. > From ea7773cc046992e327030fb99935afc5b25c1b4b Mon Sep 17 00:00:00 2001 > From: Aurimas Fischer > Date: Mon, 26 Jan 2009 21:55:05