From: Mike Frysinger Date: Sat, 15 Oct 2011 13:10:23 -0400 Subject: [U-Boot] [PATCH] zlib: handle overflow while calculating available stream input size In-Reply-To: <1318696372-13816-1-git-send-email-agust@denx.de> References: <1311077563-30531-1-git-send-email-agust@denx.de> <1318696372-13816-1-git-send-email-agust@denx.de> Message-ID: <201110151310.26032.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Saturday 15 October 2011 12:32:52 Anatolij Gustschin wrote: > If compressed data is located in sectors at the end of the flash and > it's offset + input stream size > 0xFFFFFFFF, the uncompressing time > is very long, since processing of the stream is done bytewise (and > not blockwise) due to overflow in inflate_fast() while calculation > and checking for enough input available. > > Check for this overflow condition and limit the available stream > input size to the actually max. possible input size. This fixes > the problem. > > The issue is easily reproduceable by placing a gziped bitmap in flash, > e.g. at FFF80000, and running 'bmp' commands like 'bmp info FFF80000' > or 'bmp display FFF80000'. The uncompressing can take up to 3 sec. > whereas it should normaly take a fraction of a second. If the > 'splashimage' environment variable points to this address, the > booting time also increases significantly. can we send this to the upstream zlib project if it isn't there already and get feedback from them ? -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20111015/99734d06/attachment.pgp