summaryrefslogtreecommitdiff
path: root/common/cmd_fdc.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-03-12 01:59:35 +0100
committerWolfgang Denk <wd@pollux.denx.de>2006-03-12 01:59:35 +0100
commitdc013d464000635a5b8ae841c6e683f94a6bee3d (patch)
treeae381c15180d16a1d30d4c5d0a7217741d8aaf64 /common/cmd_fdc.c
parent8ff0208d31223e36f7c038982589b448d7fdd217 (diff)
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c
index 02dffa38e5..03f4ce6d34 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++;