diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c index 5f174faa946..e86bb63bf29 100644 --- a/dlls/oleaut32/olepicture.c +++ b/dlls/oleaut32/olepicture.c @@ -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);