memory corruption in dlls/oleaut32/olepicture.c?

Damjan Jovanovic damjan.jov at gmail.com
Tue Jan 9 00:40:08 CST 2007


Hi

In dlls/oleaut32/olepicture.c, there are several places where memory
is allocated and then used immediately, without checking whether
allocation succeeded. For example:

1479       xbuf = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, origsize);
1480       if (headerisdata)
1481           memcpy (xbuf, &header, 8);

Is there something I'm missing, or does that sort of code lead to
memory corruption / segmentation faults when allocating memory fails?

>From what I see on
http://people.redhat.com/mstefani/wine/smatch/bugs_all.html, smatch
doesn't detect this as an error. What should we do?

Damjan



More information about the wine-devel mailing list