mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Fix ppc32 zImage inflate
@ 2006-07-20  3:56 Peter Korsgaard
  2006-07-20  4:01 ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2006-07-20  3:56 UTC (permalink / raw)
  To: rpurdie; +Cc: linux-kernel

Hi,

The recent zlib update (commit
4f3865fb57a04db7cca068fed1c15badc064a302) broke ppc32 zImage
decompression as it tries to decompress to address zero and the
updated zlib_inflate checks that strm->next_out isn't a null pointer.

This little patch fixes it.

diff -Naur linux-2.6.18-rc2.orig/lib/zlib_inflate/inflate.c linux-2.6.18-rc2/lib/zlib_inflate/inflate.c
--- linux-2.6.18-rc2.orig/lib/zlib_inflate/inflate.c	2006-07-20 10:26:21.000000000 +0200
+++ linux-2.6.18-rc2/lib/zlib_inflate/inflate.c	2006-07-20 17:02:27.000000000 +0200
@@ -347,7 +347,7 @@
     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 ||
+    if (strm == NULL || strm->state == NULL ||
         (strm->next_in == NULL && strm->avail_in != 0))
         return Z_STREAM_ERROR;

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix ppc32 zImage inflate
  2006-07-20  3:56 [PATCH] Fix ppc32 zImage inflate Peter Korsgaard
@ 2006-07-20  4:01 ` Peter Korsgaard
  2006-07-22 17:27   ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2006-07-20  4:01 UTC (permalink / raw)
  To: rpurdie; +Cc: linux-kernel

>>>>> "Peter" == Peter Korsgaard <jacmet@sunsite.dk> writes:

 Peter> Hi,
 Peter> The recent zlib update (commit
 Peter> 4f3865fb57a04db7cca068fed1c15badc064a302) broke ppc32 zImage
 Peter> decompression as it tries to decompress to address zero and the
 Peter> updated zlib_inflate checks that strm->next_out isn't a null pointer.

 Peter> This little patch fixes it.

Crap - forgot to sign off :/

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

diff -Naur linux-2.6.18-rc2.orig/lib/zlib_inflate/inflate.c linux-2.6.18-rc2/lib/zlib_inflate/inflate.c
--- linux-2.6.18-rc2.orig/lib/zlib_inflate/inflate.c	2006-07-20 10:26:21.000000000 +0200
+++ linux-2.6.18-rc2/lib/zlib_inflate/inflate.c	2006-07-20 17:02:27.000000000 +0200
@@ -347,7 +347,7 @@
     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 ||
+    if (strm == NULL || strm->state == NULL ||
         (strm->next_in == NULL && strm->avail_in != 0))
         return Z_STREAM_ERROR;

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix ppc32 zImage inflate
  2006-07-20  4:01 ` Peter Korsgaard
@ 2006-07-22 17:27   ` Tom Rini
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Rini @ 2006-07-22 17:27 UTC (permalink / raw)
  To: Peter Korsgaard, Andrew Morton; +Cc: rpurdie, linux-kernel

On Thu, Jul 20, 2006 at 06:01:23AM +0200, Peter Korsgaard wrote:
> >>>>> "Peter" == Peter Korsgaard <jacmet@sunsite.dk> writes:
> 
>  Peter> Hi,
>  Peter> The recent zlib update (commit
>  Peter> 4f3865fb57a04db7cca068fed1c15badc064a302) broke ppc32 zImage
>  Peter> decompression as it tries to decompress to address zero and the
>  Peter> updated zlib_inflate checks that strm->next_out isn't a null pointer.
> 
>  Peter> This little patch fixes it.
> 
> Crap - forgot to sign off :/
> 

Acked-by: Tom Rini <trini@kernel.crashing.org>

> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
> 
> diff -Naur linux-2.6.18-rc2.orig/lib/zlib_inflate/inflate.c linux-2.6.18-rc2/lib/zlib_inflate/inflate.c
> --- linux-2.6.18-rc2.orig/lib/zlib_inflate/inflate.c	2006-07-20 10:26:21.000000000 +0200
> +++ linux-2.6.18-rc2/lib/zlib_inflate/inflate.c	2006-07-20 17:02:27.000000000 +0200
> @@ -347,7 +347,7 @@
>      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 ||
> +    if (strm == NULL || strm->state == NULL ||
>          (strm->next_in == NULL && strm->avail_in != 0))
>          return Z_STREAM_ERROR;
> 
> -- 
> Bye, Peter Korsgaard
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Tom Rini

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-07-22 17:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-20  3:56 [PATCH] Fix ppc32 zImage inflate Peter Korsgaard
2006-07-20  4:01 ` Peter Korsgaard
2006-07-22 17:27   ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®