Fix gunzip to work for any gziped uImage size
PATCH 1/1 Fix gunzip to work for any gziped uImage size
Signed-off-by Catalin Radu <[email protected]>
--- lib/gunzip.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-)
lib/gunzip.c +10 -6
@@ -106,12 +106,16 @@ int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp, s.avail_in = *lenp - offset; s.next_out = dst; s.avail_out = dstlen; - r =inflate (&s,Z_FINISH ); -if ((r !=Z_STREAM_END ) && (stoponerr==1 )) { -printf ("Error: inflate() returned %d\n" , r); -inflateEnd (&s); -return (-1 ); - } +do { + r =inflate (&s,Z_FINISH ); +if (r !=Z_STREAM_END && r !=Z_BUF_ERROR && stoponerr ==1 ) { +printf ("Error: inflate() returned %d\n" , r); +inflateEnd (&s); +return -1 ; + } + s.avail_in = *lenp - offset - (int )(s.next_out - (unsigned char *)dst); + s.avail_out = dstlen; + }while (r ==Z_BUF_ERROR ); *lenp = s.next_out - (unsigned char *) dst;inflateEnd (&s);
Signature · 1 line
1.6.3.3
PATCH 1/1 Fix gunzip to work for any gziped uImage size
Le 04/02/2011 13:35, Catalin Radu a ?crit :
Quoted 2 lines
Signed-off-by Catalin Radu<[email protected]>
This is a V2 patch, right? So it should be marked as such and patch history should be added, see
<http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions>
Amicalement,
Signature · 1 line
Albert.
Wolfgang Denk
AppliedPATCH 1/1 Fix gunzip to work for any gziped uImage size
In reply to Catalin RaduDear Catalin Radu,
Quoted 5 lines · In message <[email protected]> you…
Signed-off-by Catalin Radu <[email protected]>--- lib/gunzip.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 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 Computers are not intelligent. They only think they are.