SuperHouse / esp-open-rtos

Open source FreeRTOS-based ESP8266 software framework
BSD 3-Clause "New" or "Revised" License
1.52k stars 491 forks source link

Fixed sysparams flash area address calculation #676

Closed quietboil closed 5 years ago

quietboil commented 5 years ago

As the addr is not a pointer adding a size of the buffer in words calculates a wrong offset in flash (+8 instead of +32). This eventually leads to the loop overstepping the boundary of the sysparam area and include the beginning of the esp system parameters sector - the last read from 0x003fafe8 to 0x003fb007 with a 4M flash. The latter is not empty, so the sysparam area checker would always see the sysparam area as not empty.

UncleRus commented 5 years ago

Nice catch!