diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2012-08-08 20:39:27 +0200 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2012-08-08 20:39:27 +0200 |
commit | b581c7f25d47ce3936e537328569bc4258af4f17 (patch) | |
tree | ca07f8f8eef96cd4f3d50667bb2529eec6b31c9a /src/image.c | |
parent | d10814e808da1df8bd02541d3bef86fadde518a9 (diff) | |
download | 0xFFFF-b581c7f25d47ce3936e537328569bc4258af4f17.tar.bz2 |
image: call image_align after checking hash
Diffstat (limited to 'src/image.c')
-rw-r--r-- | src/image.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/image.c b/src/image.c index b5a7576..42ba53d 100644 --- a/src/image.c +++ b/src/image.c @@ -237,7 +237,6 @@ struct image * image_alloc_from_shared_fd(int fd, size_t size, size_t offset, ui image->cur = 0; image_append(image, type, device, hwrevs, version, layout); - image_align(image); if ( image->hash != hash ) { fprintf(stderr, "Error: Image hash mishmash (expected %#04x)\n", image->hash); @@ -245,6 +244,8 @@ struct image * image_alloc_from_shared_fd(int fd, size_t size, size_t offset, ui return NULL; } + image_align(image); + return image; } |