Commit eaba2b6
Nathan Chong
Fix out-by-one error in vmpu_mpu_push
See issue #369.
This function pushes a slot/region into the v7M MPU. If g_mpu_slot is equal to
ARMv7M_MPU_REGIONS_MAX (say 8) then the overflow check
(++g_mpu_slot > ARMv7M_MPU_REGIONS_MAX)
==
(8 > 8)
==
false
does not fire (when it should) and the function will access the array
g_mpu_priority[8] out-of-bounds and write to an unsupported region number.1 parent 07dde17 commit eaba2b6
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
| 414 | + | |
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
| |||
0 commit comments