Commit 7b94c7e0 authored by Kirill Smelkov's avatar Kirill Smelkov Committed by Alexandre Julliard

OLEPictureImpl_Load: fix for headerless pictures.

parent 5420ec47
......@@ -875,7 +875,7 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
FIXME("Failure while reading picture header (hr is %lx, nread is %ld).\n",hr,xread);
return hr;
}
if (header[1] > statstg.cbSize.QuadPart) {/* Incorrect header, assume none. */
if (header[1] > statstg.cbSize.QuadPart || (header[1]==0)) {/* Incorrect header, assume none. */
xread = 8;
xbuf = This->data = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,statstg.cbSize.QuadPart);
memcpy(xbuf,&header,8);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment