diff options
Diffstat (limited to 'bfd/compress.c')
-rw-r--r-- | bfd/compress.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bfd/compress.c b/bfd/compress.c index eb3bc53..46c2bcb 100644 --- a/bfd/compress.c +++ b/bfd/compress.c @@ -45,19 +45,20 @@ decompress_contents (bfd_byte *compressed_buffer, strm.next_in = (Bytef*) compressed_buffer + 12; strm.avail_out = uncompressed_size; + BFD_ASSERT (Z_OK == 0); rc = inflateInit (&strm); while (strm.avail_in > 0 && strm.avail_out > 0) { if (rc != Z_OK) - return FALSE; + break; strm.next_out = ((Bytef*) uncompressed_buffer + (uncompressed_size - strm.avail_out)); rc = inflate (&strm, Z_FINISH); if (rc != Z_STREAM_END) - return FALSE; + break; rc = inflateReset (&strm); } - rc = inflateEnd (&strm); + rc |= inflateEnd (&strm); return rc == Z_OK && strm.avail_out == 0; } #endif |