mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Merged in david_s5/nuttx-2/david_s5/i-was-wrong-the-original-commit-was-cor-1481231650458 (pull request #179)
I was wrong - the original commit was correct. Assume a write op on the last word: address of 0xxxxxfe and count of 2. It is a valid operation and address+count is == STM32_FLASH_SIZE - so that is OK
This commit is contained in:
@@ -313,7 +313,7 @@ ssize_t up_progmem_write(size_t addr, const void *buf, size_t count)
|
||||
addr -= STM32_FLASH_BASE;
|
||||
}
|
||||
|
||||
if ((addr+count) >= STM32_FLASH_SIZE)
|
||||
if ((addr+count) > STM32_FLASH_SIZE)
|
||||
{
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user