Skip to contentSkip to conversation

bootm: set max decompression size for LZO

PATCH In review Kees Cook 3 participants 3 messages Apr 15, 2014 – Apr 18, 2014

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 bootm: set max decompression size for LZO

The LZO decompressor wasn't initializing the maximum output size, which meant it would fail to decompress most of the time.

---
 common/cmd_bootm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/cmd_bootm.c +1 -1
index 9751edc..c243a5b 100644
@@ -453,7 +453,7 @@ static int bootm_load_os(bootm_headers_t *images, unsigned long *load_end,
 #endif /* CONFIG_LZMA */
 #ifdef CONFIG_LZO
 	case IH_COMP_LZO: {
-		size_t size;
+		size_t size = unc_len;
 
 		printf("   Uncompressing %s ... ", type_name);
 
Signature · 6 lines
1.7.9.5


-- 
Kees Cook
Chrome OS Security
#2 lore raw
In reply to Kees Cook
Quoted 7 lines · Kees Cook

The LZO decompressor wasn't initializing the maximum output size, which meant it would fail to decompress most of the time.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140418/a2cf5ddc/attachment.pgp>