summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-06-25 09:21:47 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-06-25 09:26:58 +0100
commit59eee3c0a492e05c47e85cb53eeb25ad6bf0322a (patch)
tree5adbe8bc70e36e274b52c2bc98537b92db2cbf77
parente5b3a644437a4e74f85a197eb6a8c4a2d0f71e24 (diff)
coverity#1019312 check inflateInit return value
Change-Id: I5ec18176291e128c79d3e51e39b8a42b17a27b30
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfentries.cxx4
1 files changed, 2 insertions, 2 deletions
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 )
{