diff --git a/esp-bootloader-esp-idf/CHANGELOG.md b/esp-bootloader-esp-idf/CHANGELOG.md index 37854b7a5d4..7c01f4b1bfe 100644 --- a/esp-bootloader-esp-idf/CHANGELOG.md +++ b/esp-bootloader-esp-idf/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - FlashRegion: The `capacity` methods implemented for `embedded_storage::ReadStorage` and `embedded_storage::nor_flash::ReadNorFlash` now return the same value (#3902) - Don't fail the build on long project names (#3905) - FlashRegion: Fix off-by-one bug when bounds checking (#3977) +- FlashRegion: Fix exclusive upper bound checking when erasing (#4055) ### Removed diff --git a/esp-bootloader-esp-idf/src/partitions.rs b/esp-bootloader-esp-idf/src/partitions.rs index b3b84ba37cd..95ae5591872 100644 --- a/esp-bootloader-esp-idf/src/partitions.rs +++ b/esp-bootloader-esp-idf/src/partitions.rs @@ -649,7 +649,7 @@ where return Err(Error::OutOfBounds); } - if !self.range().contains(&address_to) { + if address_to > self.range().end { return Err(Error::OutOfBounds); }