summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw@amazon.co.uk>2017-03-08 22:41:09 +0000
committerSimon Horman <horms@verge.net.au>2017-03-13 09:59:08 +0100
commit67234243bb91052b816cdc8b922cd4bab21f22dd (patch)
tree9813f144852f2f4bfa153de4227f00b3b8f271d8
parent0cc1891c4dc84a2cbbd1f126134ce51538f260dc (diff)
uImage: Fix uImage_load() for little-endian machines
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/kexec-uImage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kexec/kexec-uImage.c b/kexec/kexec-uImage.c
index 667cd93..49f266a 100644
--- a/kexec/kexec-uImage.c
+++ b/kexec/kexec-uImage.c
@@ -236,7 +236,7 @@ int uImage_load(const unsigned char *buf, off_t len, struct Image_info *image)
{
const struct image_header *header = (const struct image_header *)buf;
const unsigned char *img_buf = buf + sizeof(struct image_header);
- off_t img_len = header->ih_size;
+ off_t img_len = be32_to_cpu(header->ih_size);
/*
* Prevent loading a modified image.