dstlen < 0 for MultiByteToWideChar / WideChatToMultiByte
mstefani at redhat.com
Wed Sep 16 17:43:00 CDT 2009
although Smatch could have handled the task too of finding places where
Wine passes -1 as destlen to MultiByteToWideChar / WideChatToMultiByte
this can be done with the C compiler too. Please see the attached patch.
This solution doesn't finds more occurrences that you have found and
patched already. But this is really only the stuff that the compiler can
figure out at compile time. It has no chance at all to catch stuff like
void foo(int bar)
int dstlen = -1;
dstlen = 10;
MultiByteToWideChar(a, b, c, d, e, dstlen)
Those can't be found by a grep either and I think that's why Alexandre
is reluctant to apply your patches.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1852 bytes
Desc: not available
More information about the wine-devel