coverity#1019312 check inflateInit return value

Change-Id: I5ec18176291e128c79d3e51e39b8a42b17a27b30
This commit is contained in:
Caolán McNamara
2013-06-25 09:21:47 +01:00
parent e5b3a64443
commit 59eee3c0a4

View File

@@ -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 )
{