Skip to content

Commit 3871b0f

Browse files
committed
Fix bound checking when erasing FlashRegion
Allow the exclusive address_to to be equal to the exclusive upper bound of a partition.
1 parent a5f929a commit 3871b0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

esp-bootloader-esp-idf/src/partitions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ where
649649
return Err(Error::OutOfBounds);
650650
}
651651

652-
if !self.range().contains(&address_to) {
652+
if !address_to <= self.range().end {
653653
return Err(Error::OutOfBounds);
654654
}
655655

0 commit comments

Comments
 (0)