From e46dfbecc44e9c7a147a3b50177d782baf68c6b8 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 6 May 2007 14:51:56 -0700 Subject: [PATCH] --- yaml --- r: 54337 b: refs/heads/master c: f0ac675806441d17303707856f4d23bd27092014 h: refs/heads/master i: 54335: 602210dfda7922adc25ed4524b10a0e54de0e5e4 v: v3 --- [refs] | 2 +- trunk/lib/zlib_inflate/inflate.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 397af7d88152..d30dc53f8e09 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c24228daa1e489721812815838220de607260df9 +refs/heads/master: f0ac675806441d17303707856f4d23bd27092014 diff --git a/trunk/lib/zlib_inflate/inflate.c b/trunk/lib/zlib_inflate/inflate.c index fceb97c3aff7..7e1e3114a73e 100644 --- a/trunk/lib/zlib_inflate/inflate.c +++ b/trunk/lib/zlib_inflate/inflate.c @@ -743,12 +743,14 @@ int zlib_inflate(z_streamp strm, int flush) strm->data_type = state->bits + (state->last ? 64 : 0) + (state->mode == TYPE ? 128 : 0); - if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK) - ret = Z_BUF_ERROR; if (flush == Z_PACKET_FLUSH && ret == Z_OK && - (strm->avail_out != 0 || strm->avail_in == 0)) + strm->avail_out != 0 && strm->avail_in == 0) return zlib_inflateSyncPacket(strm); + + if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK) + ret = Z_BUF_ERROR; + return ret; }