msi: correctly handle return value of msi_realloc. [1/2]

Lionel_Debroux lionel_debroux at yahoo.fr
Sat Dec 22 04:28:53 CST 2007


Several functions in dlls/msi/action.c and dlls/msi/database.c use
constructs of the form
ptr = msi_realloc (ptr, newsize);

In the (admittedly very unlikely) situation where msi_realloc fails,
this leaks, or even faults:
filename = msi_realloc(filename, len * sizeof(WCHAR) + sizeof(szlnk));
memcpy(filename + len, szlnk, sizeof(szlnk));

2007-12-14  Lionel Debroux <lionel_debroux at yahoo.fr>
        * dlls/msi/action.c, dlls/msi/database.c:
        msi: correctly handle return value of msi_realloc.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-msi-correctly-handle-return-value-of-msi_realloc.patch
Type: text/x-diff
Size: 4214 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071222/8363565f/attachment.patch 


More information about the wine-patches mailing list