Skip to contentSkip to conversation

zlib: Fix integer cast of pointer

PATCH New Simon Glass 2 participants 2 messages Oct 17, 2011 – Oct 27, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 zlib: Fix integer cast of pointer

Fix to cast an integer to a pointer using uintptr_t.

---
 lib/zlib/inffast.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
lib/zlib/inffast.c +1 -1
index 4834b0c..38f2f90 100644
@@ -105,7 +105,7 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
          * overflow detected, limit strm->avail_in to the
          * max. possible size and recalculate last
          */
-        strm->avail_in = 0xffffffff - (unsigned int)in;
+	strm->avail_in = 0xffffffff - (uintptr_t)in;
         last = in + (strm->avail_in - 5);
     }
     out = strm->next_out - OFF;
Signature · 1 line
1.7.3.1
#1 lore raw

PATCH 1/1 zlib: Fix integer cast of pointer

Dear Simon Glass,

Quoted 6 lines · In message <[email protected]> you wrote:

Fix to cast an integer to a pointer using uintptr_t.

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

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 7 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"I knew then (in 1970) that a 4-kbyte minicomputer would cost as much
as a house. So I reasoned  that  after  college,  I'd  have  to  live
cheaply in an apartment and put all my money into owning a computer."
      - Apple co-founder Steve Wozniak, EE Times, June 6, 1988, pg 45