nodemcu / nodemcu-firmware

Lua based interactive firmware for ESP8266, ESP8285 and ESP32
https://nodemcu.readthedocs.io
MIT License
7.64k stars 3.12k forks source link

Ensure flash address is set before obtaining memory mapped address. #3519

Closed h2zero closed 2 years ago

h2zero commented 2 years ago

Before this change the struck member add_phys would contain random data and the call to spi_flash_phys2cache could return an incorrect memory address.

jmattsson commented 2 years ago

Yikes, I'm surprised this hasn't bitten me before! Thanks for the fix!