msxml3/tests: VT_EMPTY is not a string (resend)
Dan Kegel
dank at kegel.com
Tue Jun 10 13:36:25 CDT 2008
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
[Resending. Anything wrong with this?]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msxml3-xmlelem.patch
Type: text/x-diff
Size: 1022 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080610/18e6b531/attachment.patch
More information about the wine-patches
mailing list