Commit c94b2687 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

ole32: Only read known format ids when attempting to read summary information.

parent b4c3a041
...@@ -1314,6 +1314,13 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This) ...@@ -1314,6 +1314,13 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
hr = PropertyStorage_ReadFmtIdOffsetFromStream(This->stm, &fmtOffset); hr = PropertyStorage_ReadFmtIdOffsetFromStream(This->stm, &fmtOffset);
if (FAILED(hr)) if (FAILED(hr))
goto end; goto end;
if (!IsEqualGUID(&fmtOffset.fmtid, &FMTID_DocSummaryInformation) &&
!IsEqualGUID(&fmtOffset.fmtid, &FMTID_SummaryInformation))
{
WARN("not reading unknown fmtid %s\n", debugstr_guid(&fmtOffset.fmtid));
hr = S_FALSE;
goto end;
}
if (fmtOffset.dwOffset > stat.cbSize.u.LowPart) if (fmtOffset.dwOffset > stat.cbSize.u.LowPart)
{ {
WARN("invalid offset %d (stream length is %d)\n", fmtOffset.dwOffset, WARN("invalid offset %d (stream length is %d)\n", fmtOffset.dwOffset,
......
...@@ -333,7 +333,6 @@ static void testProps(void) ...@@ -333,7 +333,6 @@ static void testProps(void)
hr = IPropertySetStorage_Open(propSetStorage, &anyOldGuid, hr = IPropertySetStorage_Open(propSetStorage, &anyOldGuid,
STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &propertyStorage); STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &propertyStorage);
todo_wine
ok(hr == S_OK, "IPropertySetStorage_Open failed: 0x%08x\n", hr); ok(hr == S_OK, "IPropertySetStorage_Open failed: 0x%08x\n", hr);
spec.ulKind = PRSPEC_PROPID; spec.ulKind = PRSPEC_PROPID;
......
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