pdh: check for NULL pointer reference

Jeff Latimer lats at yless4u.com.au
Mon Oct 22 07:32:27 CDT 2007

>> In this case the fix is for a Null reference as indicated in the 
>> accompanying tests.  The test prangs in the current build and the patch 
>> for pdh_main.c fixes the behaviour on XP.  As I said, I can't tell if it 
> How can a fix to pdh_main.c (which is Wine's implementation) fix
> something on XP?
The test shows a fault in wine not XP, sorry if I confused the issue.  
When this test is executed it causes a NULL reference in wine.  The fix 
is for wine.
>> fixes it in anything else.  However, there needs to be a fix for the 
>> NULL reference and the case of needing a buffer if size and index > 0 
>> seems to be reasonable behaviour. 
> When a test fails on some version of Windows something is wrong with
> the test itself. Possible solutions are to make the test accept the
> different behavior too or to remove the test altogether when it is
> sufficiently clear that applications cannot depend on any particular
> behaviour.
I have no idea whether this test has a problem on one version of Windows 
or another.  I only know the behaviour in XP.  This is not a case of XP 
explicit behaviour it is simply a case of NULL reference.  I split the 
fix into two lines rather than merging it into one because it made the 
test pass ok in wine and Windows XP.  I put a comment to say that as I 
am sure that someone would have picked that up and queried it.  My 
question was whether this was the same behaviour in other flavours of 
windows.  I suspect it is ok but... your previous posts indicated that 
there may be problems.


More information about the wine-devel mailing list