The entry point of an image can be 0 (like on PowerPC), so allow next_out
to be NULL in inflate()

Signed-off-by: Alessandro Rubini <rub...@unipv.it>
---

Stefan Roese:
> I'll try to uncompress to something != 0 tomorrow on PPC.

You are right. I naively thought my arm has RAM at 0 like PPC, but
entry point of image is not really 0.


 lib_generic/zlib.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib_generic/zlib.c b/lib_generic/zlib.c
index f415f6b..49fb145 100644
--- a/lib_generic/zlib.c
+++ b/lib_generic/zlib.c
@@ -1365,7 +1365,7 @@ 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 == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL ||
+    if (strm == Z_NULL || strm->state == Z_NULL ||
         (strm->next_in == Z_NULL && strm->avail_in != 0))
         return Z_STREAM_ERROR;
 
-- 
1.5.6.5
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to