mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 14:41:31 +00:00
Fix initrd length corruption in bootm command.
When using FDT Images, the length of an inital ramdisk was
overwritten (bug introduced by commit 87a449c8
, 22 Aug 2006).
Patches by Timur Tabi & Johns Daniel.
Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
parent
c64a89d6ce
commit
9877d7dcd1
1 changed files with 1 additions and 2 deletions
|
@ -779,9 +779,8 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
|
||||||
|
|
||||||
checksum = ntohl(hdr->ih_dcrc);
|
checksum = ntohl(hdr->ih_dcrc);
|
||||||
addr = (ulong)((uchar *)(hdr) + sizeof(image_header_t));
|
addr = (ulong)((uchar *)(hdr) + sizeof(image_header_t));
|
||||||
len = ntohl(hdr->ih_size);
|
|
||||||
|
|
||||||
if(checksum != crc32(0, (uchar *)addr, len)) {
|
if(checksum != crc32(0, (uchar *)addr, ntohl(hdr->ih_size))) {
|
||||||
printf("ERROR: Flat Device Tree checksum is invalid\n");
|
printf("ERROR: Flat Device Tree checksum is invalid\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue