summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-20 09:49:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-08-20 09:49:46 +0100
commit30541352a195c57c0b4f65e29b1994be46421ad1 (patch)
treea48c70789d9bd54217f7361fee90a6aa96a8ae6e /sdext
parentd01ee7e2cc7315728a5a8e04bb1d6847ec185483 (diff)
fix string out-of-bounds assert on rhbz496762-1.pdf
Change-Id: I224e3c9befd1a9ab3ba0cc2676cd6b4ba51214c8
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/wrapper/wrapper.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 7cdb775b256b..eedffe48ba03 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -374,7 +374,10 @@ void Parser::readChar()
readDouble(aUnoMatrix.m11);
readDouble(fontSize);
- OString aChars = lcl_unescapeLineFeeds( m_aLine.copy( m_nCharIndex ) );
+ OString aChars;
+
+ if (m_nCharIndex != -1)
+ aChars = lcl_unescapeLineFeeds( m_aLine.copy( m_nCharIndex ) );
// chars gobble up rest of line
m_nCharIndex = -1;