summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-02-24 18:14:01 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-02-24 21:04:16 +0000
commitcffa23b8d0c0b2d660505a11784addb7715a9937 (patch)
treec2d6958816d13aef3cf8524e47e88f5550ce16ee /sdext
parentece3c97ca6c9aaffbf9dd51785ae2f1d4d3e2c9b (diff)
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@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/tree/imagecontainer.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/sdext/source/pdfimport/tree/imagecontainer.cxx b/sdext/source/pdfimport/tree/imagecontainer.cxx
index 650b58446012..64d17c66ef7e 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() ));
}