path: root/common/cmd_bootm.c
diff options
authorMatthias Fuchs <matthias.fuchs@esd-electronics.com>2009-01-02 15:11:41 +0100
committerWolfgang Denk <wd@denx.de>2009-01-27 20:59:09 +0100
commit107b801cf3fe39612d69d70581ebc3bf5e215554 (patch)
tree6e15eae452a228d7025dba569b67dd62f1a3b935 /common/cmd_bootm.c
parent49ad4801714039ac8b9cae4de9c097224183e465 (diff)
Fix gunzip in case of insufficient output buffer
U-Boot's gunzip() function does not handle the return code of zlib's inflate() function correctly. gunzip() is implemented to uncompress all input data in one run. So the correct return code for the good case is Z_STREAM_END. In case of insufficient output buffer memory inflate returns Z_OK. For gunzip() this is an error. It also makes sense to me to call inflateEnd() also in case of an error. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Diffstat (limited to 'common/cmd_bootm.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index a8f85e93b..905567293 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -350,7 +350,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
printf (" Uncompressing %s ... ", type_name);
if (gunzip ((void *)load, unc_len,
(uchar *)image_start, &image_len) != 0) {
- puts ("GUNZIP: uncompress or overwrite error "
+ puts ("GUNZIP: uncompress, out-of-mem or overwrite error "
"- must RESET board to recover\n");
if (boot_progress)
show_boot_progress (-6);