mirror of
https://github.com/apache/nuttx.git
synced 2026-10-07 22:35:22 +00:00
Merged in david_s5/nuttx-9/david_s5/i-think-that-size-is-highest-address1-b-1478039243625 (pull request #163)
I think, that Size is (highest address+1 - Base address)
This commit is contained in:
commit
3e5808d9fd
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue