msxml3/tests: VT_EMPTY is not a string (resend 2)
dank at kegel.com
Sun Jun 22 16:32:31 CDT 2008
This time using NULL instead of (void *) 0.
Casting a VT_EMPTY to a string gets you a null string.
The test was doing that and taking the string length, then comparing to zero.
Better to simply compare to null; that's a stronger test, and
avoids generating a behind-the-scenes exception.
kernel32/tests is the place to test that lstrlenW( badptr ) == 0,
no need to duplicate that here.
Passes on Wine and XP, and gets rid of the valgrind warning
Invalid read of size 2
at strlenW (unicode.h:212)
by lstrlenW (string.c:384)
by test_xmlelem (xmlelem.c:83)
by func_xmlelem (xmlelem.c:455)
Address 0x0 is not stack'd, malloc'd or (recently) free'd
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1022 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080622/9c47550d/attachment.patch
More information about the wine-patches