Kaydet (Commit) fc5513f4 authored tarafından Caolán McNamara's avatar Caolán McNamara

tdf#112399 ignore size of unknown/unused ole2 entries

Change-Id: I9908453c1a11997141f7d6c4e1dccff53984321c
Reviewed-on: https://gerrit.libreoffice.org/42436Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst e38d2f05
......@@ -424,6 +424,18 @@ bool StgEntry::Load(const void* pFrom, sal_uInt32 nBufSize, sal_uInt64 nUnderlyi
//bad pageid
return false;
}
if (m_cType == STG_EMPTY)
{
/*
tdf#112399 opens fine in MSOffice 2013 despite a massive m_nSize field
Free (unused) directory entries are marked with Object Type 0x0
(unknown or unallocated). The entire directory entry must consist of
all zeroes except for the child, right sibling, and left sibling
pointers, which must be initialized to NOSTREAM (0xFFFFFFFF).
*/
m_nSize = 0;
}
if (m_nSize < 0)
{
// the size makes no sense for the substorage
......
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