From ed34cd339eab82b49cdbed45820fe481b75da5a3 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Fri, 9 Nov 2012 18:35:33 +0200 Subject: [PATCH] BmapCreate.py: fix a brown-paperbag bug We did not seek the image file, so BmapCreate calculated SHA1 incorrectly. Fix this. Change-Id: Ie99cf26ac3af4a319832dc79bc82ba89b7b31280 Reported-by: Ross Burton Signed-off-by: Artem Bityutskiy --- bmaptools/BmapCreate.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bmaptools/BmapCreate.py b/bmaptools/BmapCreate.py index cc26907..0d6009f 100644 --- a/bmaptools/BmapCreate.py +++ b/bmaptools/BmapCreate.py @@ -282,6 +282,8 @@ class BmapCreate: start = first * self.bmap_block_size end = (last + 1) * self.bmap_block_size + + self._f_image.seek(start) hash_obj = hashlib.sha1() chunk_size = 1024*1024 -- 2.7.4