All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alessandro Rubini <rubini-list@gnudd.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] zlib: allow 0 as destination pointer
Date: Mon, 27 Jul 2009 18:40:31 +0200	[thread overview]
Message-ID: <20090727164031.GA3963@mail.gnudd.com> (raw)
In-Reply-To: <200907271730.36098.sr@denx.de>

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 <rubini@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

  reply	other threads:[~2009-07-27 16:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <05a201ca0ec5@st.com>
2009-07-27 15:09 ` [U-Boot] [PATCH v3] zlib: updated to v.1.2.3 Alessandro Rubini
2009-07-27 15:30   ` Stefan Roese
2009-07-27 16:40     ` Alessandro Rubini [this message]
2009-07-27 18:02       ` [U-Boot] [PATCH] zlib: allow 0 as destination pointer rhabarber1848
2009-07-27 18:15         ` Wolfgang Denk
2009-07-27 20:13           ` rhabarber1848
2009-07-27 20:45             ` Wolfgang Denk
2009-07-28  6:31       ` Stefan Roese
2009-07-29  6:07         ` Giuseppe CONDORELLI
2009-07-29  6:23           ` Wolfgang Denk
2009-07-29  6:29             ` Giuseppe CONDORELLI
2009-07-29  7:10               ` Wolfgang Denk
2009-07-29  6:53             ` rhabarber1848
2009-07-29  7:11               ` Wolfgang Denk
2009-07-29  8:50                 ` Giuseppe CONDORELLI
     [not found] <002901ca1029@st.com>
2009-07-29  9:20 ` Alessandro Rubini
2009-07-29 10:32   ` rhabarber1848
2009-07-29 10:50     ` Giuseppe CONDORELLI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090727164031.GA3963@mail.gnudd.com \
    --to=rubini-list@gnudd.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.