[Libreoffice-commits] core.git: sot/qa sot/source
Caolán McNamara
caolanm at redhat.com
Mon Sep 18 22:25:11 UTC 2017
sot/qa/cppunit/data/pass/tdf112399-1.compound |binary
sot/source/sdstor/stgelem.cxx | 12 ++++++++++++
2 files changed, 12 insertions(+)
New commits:
commit fc5513f40acc56410651a147e4b03dc614ea6183
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 18 21:17:32 2017 +0100
tdf#112399 ignore size of unknown/unused ole2 entries
Change-Id: I9908453c1a11997141f7d6c4e1dccff53984321c
Reviewed-on: https://gerrit.libreoffice.org/42436
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sot/qa/cppunit/data/fail/fdo41642-2.compound b/sot/qa/cppunit/data/pass/fdo41642-2.compound
similarity index 100%
rename from sot/qa/cppunit/data/fail/fdo41642-2.compound
rename to sot/qa/cppunit/data/pass/fdo41642-2.compound
diff --git a/sot/qa/cppunit/data/pass/tdf112399-1.compound b/sot/qa/cppunit/data/pass/tdf112399-1.compound
new file mode 100644
index 000000000000..d3628def0c01
Binary files /dev/null and b/sot/qa/cppunit/data/pass/tdf112399-1.compound differ
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index 4e18d0e1b4d0..a178ff45f603 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -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
More information about the Libreoffice-commits
mailing list