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

Markus Mohrhard markus.mohrhard at googlemail.com
Fri Feb 24 21:04:42 UTC 2017


 sdext/source/pdfimport/tree/imagecontainer.cxx |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

New commits:
commit cffa23b8d0c0b2d660505a11784addb7715a9937
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri Feb 24 18:14:01 2017 +0100

    fix crash in pdfimport
    
    Found by the crashreporter:
    http://crashreport.libreoffice.org/stats/crash_details/2eaeda85-849d-4098-b215-a8e64fe82089
    
    Change-Id: I113f4dfc4a4f45511102c417d39fe15db6050daa
    Reviewed-on: https://gerrit.libreoffice.org/34628
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sdext/source/pdfimport/tree/imagecontainer.cxx b/sdext/source/pdfimport/tree/imagecontainer.cxx
index 650b584..64d17c6 100644
--- a/sdext/source/pdfimport/tree/imagecontainer.cxx
+++ b/sdext/source/pdfimport/tree/imagecontainer.cxx
@@ -126,12 +126,19 @@ void ImageContainer::writeBase64EncodedStream( ImageId nId, EmitContext& rContex
             [] (beans::PropertyValue const& v) -> bool {
                 return v.Name == "InputSequence";
             }));
-    OSL_ENSURE( pValue != pAry+nLen,
-                "InputSequence not found" );
+
+    if (pValue == pAry + nLen )
+    {
+        SAL_WARN("pdfimport", "InputSequence not found");
+        return;
+    }
 
     uno::Sequence<sal_Int8> aData;
     if( !(pValue->Value >>= aData) )
-        OSL_FAIL("Wrong data type");
+    {
+        SAL_WARN("pdfimport", "Wrong data type");
+        return;
+    }
 
     rContext.rEmitter.write( encodeBase64( aData.getConstArray(), aData.getLength() ));
 }


More information about the Libreoffice-commits mailing list