[Libreoffice-commits] core.git: sdext/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Mar 20 12:45:45 UTC 2021
sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 55a96efaacd2e932c7616f6a6072f794266f5948
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Mar 19 15:54:31 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Mar 20 13:45:01 2021 +0100
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 at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
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);
More information about the Libreoffice-commits
mailing list