[U-Boot-Users] [PATCH 08/13] [new uImage] Fix uImage header pointer use in i386 do_bootm_linux()

Marian Balakowicz m8 at semihalf.com
Fri Jan 11 15:29:42 CET 2008


Use image header copy instead of a (possibly corrupted) pointer to
a initial image location.

Signed-off-by: Marian Balakowicz <m8 at semihalf.com>
---

 lib_i386/i386_linux.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/lib_i386/i386_linux.c b/lib_i386/i386_linux.c
index 8792d84..3a92570 100644
--- a/lib_i386/i386_linux.c
+++ b/lib_i386/i386_linux.c
@@ -129,13 +129,13 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
 	}
 
 	/* if multi-part image, we need to advance base ptr */
-	if (image_check_type(hdr, IH_TYPE_MULTI) && (len_ptr[1])) {
+	if (image_check_type(&header, IH_TYPE_MULTI) && (len_ptr[1])) {
 		int i;
 		for (i=0, addr+=sizeof(int); len_ptr[i++]; addr+=sizeof(int));
 	}
 
 	base_ptr = load_zimage((void*)addr + image_get_header_size(),
-			       image_get_data_size(hdr),
+			       image_get_data_size(&header),
 			       initrd_start, initrd_end-initrd_start, 0);
 
 	if (NULL == base_ptr) {





More information about the U-Boot mailing list