[Libreoffice-commits] libmspub.git: src/lib
David Tardon
dtardon at redhat.com
Sat May 11 02:33:50 PDT 2013
src/lib/MSPUBParser.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 3b99673068a346ce35646336bfb99261860bcb5d
Author: David Tardon <dtardon at redhat.com>
Date: Sat May 11 11:29:51 2013 +0200
do not crash on invalid input
diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp
index 72f637e..3e49127 100644
--- a/src/lib/MSPUBParser.cpp
+++ b/src/lib/MSPUBParser.cpp
@@ -946,14 +946,14 @@ bool libmspub::MSPUBParser::parseQuill(WPXInputStream *input)
input->seek(i->offset, WPX_SEEK_SET);
std::vector<TextSpanReference> thisBlockSpans = parseCharacterStyles(input, *i);
spans.insert(spans.end(), thisBlockSpans.begin(), thisBlockSpans.end());
- parsedFdpc = true;
+ parsedFdpc |= !thisBlockSpans.empty();
}
else if (i->name == "FDPP")
{
input->seek(i->offset, WPX_SEEK_SET);
std::vector<TextParagraphReference> thisBlockParas = parseParagraphStyles(input, *i);
paras.insert(paras.end(), thisBlockParas.begin(), thisBlockParas.end());
- parsedFdpp = true;
+ parsedFdpp |= !thisBlockParas.empty();
}
else if (i->name == "STSH")
{
More information about the Libreoffice-commits
mailing list