From fb6828e51b62f9158c47d36a0f6ba6b857cf61e9 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Sun, 30 Jul 2006 03:03:12 -0700 Subject: [PATCH] --- yaml --- r: 32917 b: refs/heads/master c: 31925c8857ba17c11129b766a980ff7c87780301 h: refs/heads/master i: 32915: 7fed56645e11274b718c1065b14835a091d7d94d v: v3 --- [refs] | 2 +- trunk/lib/zlib_inflate/inflate.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 14099ad8cedc..f95c2fecaccc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 163ecdff060f2fa9e8f5238882fd0137493556a6 +refs/heads/master: 31925c8857ba17c11129b766a980ff7c87780301 diff --git a/trunk/lib/zlib_inflate/inflate.c b/trunk/lib/zlib_inflate/inflate.c index 7f922dccf1a5..fceb97c3aff7 100644 --- a/trunk/lib/zlib_inflate/inflate.c +++ b/trunk/lib/zlib_inflate/inflate.c @@ -347,7 +347,10 @@ int zlib_inflate(z_streamp strm, int flush) static const unsigned short order[19] = /* permutation of code lengths */ {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; - if (strm == NULL || strm->state == NULL || strm->next_out == NULL || + /* Do not check for strm->next_out == NULL here as ppc zImage + inflates to strm->next_out = 0 */ + + if (strm == NULL || strm->state == NULL || (strm->next_in == NULL && strm->avail_in != 0)) return Z_STREAM_ERROR;