mapi32: stop crash under win98
Paul Vriens
paul.vriens.wine at gmail.com
Thu Jun 19 00:58:09 CDT 2008
Alistair Leslie-Hughes wrote:
> Hi,
> I just added a check for a null pointer since we deference it.
>
> Changelog:
> mapi32: stop crash under win98
>
> Best Regards
> Alistair Leslie-Hughes
>
>
>
> ------------------------------------------------------------------------
>
>
+ if(lpResProp->Value.MVszA.lppszA)
+ {
+ ok(lpResProp->Value.MVszA.lppszA[0] == buffer + sizeof(SPropValue) +
sizeof(char*),
+ "wrong lppszA[0] %p\n",lpResProp->Value.MVszA.lppszA[0]);
+ ok(!strcmp(lpResProp->Value.MVszA.lppszA[0], szTestA),
+ "wrong string '%s'\n", lpResProp->Value.MVszA.lppszA[0]);
+ }
+ else
+ {
+ skip("lpResProp->Value.MVszA.lppszA is NULL");
+ }
I'm not sure if skip() is appropriate here as we are not skipping a function
call and we're not skipping subsequent function calls because of this.
If Win98 is plainly wrong, and the test maybe has to be changed, here it should
probably be:
ok(0, "lpResProp->Value.MVszA.lppszA is NULL");
If it's perfectly valid for win98 to return that NULL value is should probably
be a trace() as we still have to overcome the dereferencing.
--
Cheers,
Paul.
More information about the wine-devel
mailing list