[new uImage] Fix uImage header pointer use in i386 do_bootm_linux()
authorMarian Balakowicz <m8@semihalf.com>
Tue, 8 Jan 2008 17:11:44 +0000 (18:11 +0100)
committerWolfgang Denk <wd@denx.de>
Thu, 7 Feb 2008 00:12:55 +0000 (01:12 +0100)
Use image header copy instead of a (possibly corrupted) pointer to
a initial image location.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
lib_i386/i386_linux.c

index 6cb021a193e422ef4c09d2ed201f66968549074e..b0cf2630cadef5feb87a77b2f9b7397ff5d828fa 100644 (file)
@@ -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),
+       base_ptr = load_zimage ((void*)addr + image_get_header_size (),
+                              image_get_data_size (&header),
                               initrd_start, initrd_end-initrd_start, 0);
 
        if (NULL == base_ptr) {