From 59eee3c0a492e05c47e85cb53eeb25ad6bf0322a Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 25 Jun 2013 09:21:47 +0100 Subject: coverity#1019312 check inflateInit return value Change-Id: I5ec18176291e128c79d3e51e39b8a42b17a27b30 --- sdext/source/pdfimport/pdfparse/pdfentries.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sdext') diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx index 99243b4dc3d5..90b4de6a4d1f 100644 --- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx @@ -737,14 +737,14 @@ static void unzipToBuffer( const char* pBegin, unsigned int nLen, aZStr.zalloc = ( alloc_func )0; aZStr.zfree = ( free_func )0; aZStr.opaque = ( voidpf )0; - inflateInit(&aZStr); + + int err = inflateInit(&aZStr); const unsigned int buf_increment_size = 16384; *pOutBuf = (sal_uInt8*)rtl_reallocateMemory( *pOutBuf, buf_increment_size ); aZStr.next_out = (Bytef*)*pOutBuf; aZStr.avail_out = buf_increment_size; - int err = Z_OK; *pOutLen = buf_increment_size; while( err != Z_STREAM_END && err >= Z_OK && aZStr.avail_in ) { -- cgit