From b581c7f25d47ce3936e537328569bc4258af4f17 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Wed, 8 Aug 2012 20:39:27 +0200 Subject: image: call image_align after checking hash --- src/image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3