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:
Gregory Nutt
2016-12-08 15:15:37 -06:00
+1 -1
View File
@@ -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;
}