Skip to contentSkip to conversation

Fix ppc32 zImage inflate

PATCH Richard Purdie 1 participant 1 message Jul 20, 2006

lore
Share & tools
lore
#0 lore raw

ppc32's zImage inflates to address 0 which the recent zlib update took as an error condition. Remove the check and note the problem so anyone updating zlib in future won't fall into the same trap.

lib/zlib_inflate/inflate.c +4 -1
Index: git/lib/zlib_inflate/inflate.c
===================================================================
@@ -347,7 +347,10 @@
     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;