[Libreoffice-commits] core.git: sdext/source

Caolán McNamara caolanm at redhat.com
Wed Aug 20 01:50:42 PDT 2014


 sdext/source/pdfimport/wrapper/wrapper.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 30541352a195c57c0b4f65e29b1994be46421ad1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Aug 20 09:49:46 2014 +0100

    fix string out-of-bounds assert on rhbz496762-1.pdf
    
    Change-Id: I224e3c9befd1a9ab3ba0cc2676cd6b4ba51214c8

diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 7cdb775..eedffe4 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;


More information about the Libreoffice-commits mailing list