aboutsummaryrefslogtreecommitdiff
path: root/bfd/compress.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/compress.c')
-rw-r--r--bfd/compress.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/compress.c b/bfd/compress.c
index 52c884c..17b5928 100644
--- a/bfd/compress.c
+++ b/bfd/compress.c
@@ -46,7 +46,7 @@ decompress_contents (bfd_byte *compressed_buffer,
strm.avail_out = uncompressed_size;
rc = inflateInit (&strm);
- while (strm.avail_in > 0)
+ while (strm.avail_in > 0 && strm.avail_out > 0)
{
if (rc != Z_OK)
return FALSE;