summaryrefslogtreecommitdiff
path: root/scripts/update_payload/checker.py
diff options
context:
space:
mode:
authorGilad Arnold <garnold@chromium.org>2013-03-08 12:05:59 -0800
committerChromeBot <chrome-bot@google.com>2013-03-15 15:04:31 -0700
commitaa55d1a133cced2e084e69d5b1dd4d17c0e0d054 (patch)
treedb717fba16213ecbca4e12567c6f28f7cbacfbea /scripts/update_payload/checker.py
parent553b0ec49bc64fc4b7df4358cd31396a87276d2b (diff)
Fix update out-of-bounds check for partition boundary.
This is an off-by-one error caught during the implementation of unit tests. BUG=None TEST=Unit tests (upcoming) pass as expected. Change-Id: I9a5da10588f0ac4314e9a35280ff1f38c34c88ac Reviewed-on: https://gerrit.chromium.org/gerrit/44953 Tested-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: Chris Sosa <sosa@chromium.org> Commit-Queue: Gilad Arnold <garnold@chromium.org> Reviewed-by: Don Garrett <dgarrett@chromium.org>
Diffstat (limited to 'scripts/update_payload/checker.py')
-rw-r--r--scripts/update_payload/checker.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/update_payload/checker.py b/scripts/update_payload/checker.py
index b2920a0c..e47456dd 100644
--- a/scripts/update_payload/checker.py
+++ b/scripts/update_payload/checker.py
@@ -577,7 +577,7 @@ class PayloadChecker(object):
if start_block != common.PSEUDO_EXTENT_MARKER:
# Check: make sure we're within the partition limit.
- if part_size and (end_block - 1) * self.block_size > part_size:
+ if part_size and end_block * self.block_size > part_size:
raise PayloadError(
'%s: extent (%s) exceeds partition size (%d)' %
(ex_name, common.FormatExtent(ex, self.block_size), part_size))