Misc bugs found by using valgrind

Michael Günnewig MichaelGuennewig at gmx.de
Thu Oct 2 17:34:56 CDT 2003


Alexandre Julliard <julliard at winehq.org> writes:

> MichaelGuennewig at gmx.de (Michael Günnewig) writes:
>
>> It's a point, so here is the new patch.
>
> I don't think we need to check string sizes against MAXINT, that's
> just a waste of time.

Okay you're correct, the check isn't necessary as MAXINT * 2 is
MAXUINT - 1 and the size parameter of GlobalAlloc is unsigned.

But the * sizeof(WCHAR) in the GlobalAlloc call is necessary to avoid
possible memory corruption because of buffer overruns. So here is it.

  Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-avi2.diff
Type: text/x-patch
Size: 371 bytes
Desc: wine-avi2.diff
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20031003/61c9b5d5/wine-avi2.bin


More information about the wine-devel mailing list