aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/zlib_inflate/inflate.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/zlib_inflate/inflate.c b/lib/zlib_inflate/inflate.c
index fceb97c3aff7..7e1e3114a73e 100644
--- a/lib/zlib_inflate/inflate.c
+++ b/lib/zlib_inflate/inflate.c
@@ -743,12 +743,14 @@ int zlib_inflate(z_streamp strm, int flush)
743 743
744 strm->data_type = state->bits + (state->last ? 64 : 0) + 744 strm->data_type = state->bits + (state->last ? 64 : 0) +
745 (state->mode == TYPE ? 128 : 0); 745 (state->mode == TYPE ? 128 : 0);
746 if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
747 ret = Z_BUF_ERROR;
748 746
749 if (flush == Z_PACKET_FLUSH && ret == Z_OK && 747 if (flush == Z_PACKET_FLUSH && ret == Z_OK &&
750 (strm->avail_out != 0 || strm->avail_in == 0)) 748 strm->avail_out != 0 && strm->avail_in == 0)
751 return zlib_inflateSyncPacket(strm); 749 return zlib_inflateSyncPacket(strm);
750
751 if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
752 ret = Z_BUF_ERROR;
753
752 return ret; 754 return ret;
753} 755}
754 756