diff options
| author | Wolfgang Denk <wd@pollux.denx.de> | 2006-03-12 01:59:35 +0100 | 
|---|---|---|
| committer | Wolfgang Denk <wd@pollux.denx.de> | 2006-03-12 01:59:35 +0100 | 
| commit | dc013d464000635a5b8ae841c6e683f94a6bee3d (patch) | |
| tree | ae381c15180d16a1d30d4c5d0a7217741d8aaf64 /common/cmd_fdc.c | |
| parent | 8ff0208d31223e36f7c038982589b448d7fdd217 (diff) | |
| download | olio-uboot-2014.01-dc013d464000635a5b8ae841c6e683f94a6bee3d.tar.xz olio-uboot-2014.01-dc013d464000635a5b8ae841c6e683f94a6bee3d.zip | |
Add loads of ntohl() in image header handling
Patch by Steven Scholz, 10 Jun 2005
Diffstat (limited to 'common/cmd_fdc.c')
| -rw-r--r-- | common/cmd_fdc.c | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c index 02dffa38e..03f4ce6d3 100644 --- a/common/cmd_fdc.c +++ b/common/cmd_fdc.c @@ -836,13 +836,13 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])  		return 1;  	}  	hdr = (image_header_t *)addr; -	if (hdr->ih_magic  != IH_MAGIC) { +	if (ntohl(hdr->ih_magic)  != IH_MAGIC) {  		printf ("Bad Magic Number\n");  		return 1;  	}  	print_image_hdr(hdr); -	imsize= hdr->ih_size+sizeof(image_header_t); +	imsize= ntohl(hdr->ih_size)+sizeof(image_header_t);  	nrofblk=imsize/512;  	if((imsize%512)>0)  		nrofblk++; |