[Libreoffice-commits] mso-dumper.git: src/docrecord.py src/docstream.py
Miklos Vajna
vmiklos at kemper.freedesktop.org
Tue Jun 25 09:05:53 PDT 2013
src/docrecord.py | 1 -
src/docstream.py | 3 +++
2 files changed, 3 insertions(+), 1 deletion(-)
New commits:
commit c8a02ce6baad0b4e99c1eeb451ca1246eec9ae2c
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Tue Jun 25 18:03:46 2013 +0200
Don't crash on abi13064-1.doc
http://bugzilla.abisource.com/show_bug.cgi?id=13064 says it's corrupted
anyway, so just make the code not crash on it.
diff --git a/src/docrecord.py b/src/docrecord.py
index c747d91..87ece9d 100644
--- a/src/docrecord.py
+++ b/src/docrecord.py
@@ -3194,7 +3194,6 @@ class SttbListNames(DOCDirStream):
print '<string value="%s"/>' % globals.encodeName(self.bytes[self.pos:self.pos+2*cchData].decode('utf-16'), lowOnly = True)
self.pos += 2*cchData
print '</cchData>'
- assert self.pos == self.mainStream.fcSttbListNames + self.size
print '</sttbListNames>'
class SttbSavedBy(DOCDirStream):
diff --git a/src/docstream.py b/src/docstream.py
index cc0766b..398207c 100644
--- a/src/docstream.py
+++ b/src/docstream.py
@@ -952,6 +952,9 @@ class WordDocumentStream(DOCDirStream):
def retrieveCPs(self, start, end):
"""Retrieves a range of characters."""
+ if not len(self.clx.pcdt.plcPcd.aPcd):
+ print '<info what="clx.pcdt.plcPcd.aPcd is empty, probably corrupted document"/>'
+ return ""
ret = []
i = start
while i < end:
More information about the Libreoffice-commits
mailing list