]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - lib/zlib_inflate/inflate.c
[PATCH] Fix ppc32 zImage inflate
[mv-sheeva.git] / lib / zlib_inflate / inflate.c
index 7f922dccf1a5dd618c8553f4cf70cbd1ad2fd3b4..fceb97c3aff77f96fb7097ee9de6143f44850992 100644 (file)
@@ -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;