summaryrefslogtreecommitdiffstats
path: root/layout.c
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2021-07-01 15:17:17 +0200
committerEdward O'Callaghan <quasisec@chromium.org>2021-07-06 02:25:44 +0000
commitc9039fc27916c03e21ba91365d01e6bc49503053 (patch)
tree77336f7f32cbda9560837d890c9032e7339e1f04 /layout.c
parentcd9b7b427d19e591c1091cb783a51951ef3aeffc (diff)
downloadflashrom-c9039fc27916c03e21ba91365d01e6bc49503053.tar.gz
flashrom-c9039fc27916c03e21ba91365d01e6bc49503053.tar.bz2
flashrom-c9039fc27916c03e21ba91365d01e6bc49503053.zip
layout: Fix overlap-check routine
Fixes a regression introduced by commit 06a89d713 (layout: Introduce layout_next()). A negation was dropped by accident which resulted in comparisons with later, not-included regions instead of included ones. Change-Id: I18168b9bd9a7d0fe2ba04fb091d1600f65d6dd5b Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/55997 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/layout.c b/layout.c
index e688f794a..36aa247de 100644
--- a/layout.c
+++ b/layout.c
@@ -257,7 +257,7 @@ int included_regions_overlap(const struct flashrom_layout *const l)
const struct romentry *rhs = lhs;
while ((rhs = layout_next(l, rhs))) {
- if (rhs->included)
+ if (!rhs->included)
continue;
if (lhs->start > rhs->end)