diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-19 15:54:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-20 13:45:01 +0100 |
commit | 55a96efaacd2e932c7616f6a6072f794266f5948 (patch) | |
tree | bd4fb796286458e47a2661b04482a73e572ca421 /sdext | |
parent | c6e3fcfbb901c46191461d1a08cf0c4524729cfc (diff) |
cid#1474176 Unchecked return value from library
Change-Id: Iaba514e372ff9892bb2901b967cfd4a5a71e6fbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112779
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx index 5131838a996b..39a1df6f4a76 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx @@ -82,7 +82,8 @@ sal_uInt32 PngHelper::deflateBuffer( const Output_t* i_pBuf, size_t i_nLen, Outp aStream.zalloc = Z_NULL; aStream.zfree = Z_NULL; aStream.opaque = Z_NULL; - deflateInit( &aStream, Z_BEST_COMPRESSION ); + if (Z_OK != deflateInit(&aStream, Z_BEST_COMPRESSION)) + return 0; aStream.avail_in = uInt(i_nLen); aStream.next_in = const_cast<Bytef*>(i_pBuf); |