mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-22 21:23:07 +03:00
"init_data", when non-NULL, is on the heap, and the register_chipv6_phy call sometimes modifies data in (at least) the offset range [128:249], suggesting that it is a buffer larger than 128 bytes in size (the size of our "phy_init_data" buffer). When we use our static buffer (prior to this change), the call could would overwrite the .rodata section and lead to undefined behaviour. To address this, just patch the heap-allocated buffer with our data. Move phy_init_data to flash as it's now readonly and never modified.