diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c index b3362bc21de..f887d10c0cf 100644 --- a/dlls/ole32/stg_prop.c +++ b/dlls/ole32/stg_prop.c @@ -1314,6 +1314,13 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This) hr = PropertyStorage_ReadFmtIdOffsetFromStream(This->stm, &fmtOffset); if (FAILED(hr)) 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) { WARN("invalid offset %d (stream length is %d)\n", fmtOffset.dwOffset, diff --git a/dlls/ole32/tests/stg_prop.c b/dlls/ole32/tests/stg_prop.c index 4e5fde74745..dff3361bdc6 100644 --- a/dlls/ole32/tests/stg_prop.c +++ b/dlls/ole32/tests/stg_prop.c @@ -333,7 +333,6 @@ static void testProps(void) hr = IPropertySetStorage_Open(propSetStorage, &anyOldGuid, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &propertyStorage); - todo_wine ok(hr == S_OK, "IPropertySetStorage_Open failed: 0x%08x\n", hr); spec.ulKind = PRSPEC_PROPID;