X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=lib%2Fzlib_inflate%2Finflate.c;h=fceb97c3aff77f96fb7097ee9de6143f44850992;hb=53c7d2b7706526bf262ac10eb52d602d1520458a;hp=7f922dccf1a5dd618c8553f4cf70cbd1ad2fd3b4;hpb=37224470c8c6d90a4062e76a08d4dc1fcf91fc89;p=powerpc.git diff --git a/lib/zlib_inflate/inflate.c b/lib/zlib_inflate/inflate.c index 7f922dccf1..fceb97c3af 100644 --- a/lib/zlib_inflate/inflate.c +++ b/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;