pellepl / spiffs

Wear-leveled SPI flash file system for embedded devices
MIT License
1.52k stars 402 forks source link

Fix strncpy truncating NUL terminating char #279

Closed bigcardo closed 3 years ago

bigcardo commented 3 years ago

This fix handles the gcc's -Wstringop-truncation warning.

See: https://stackoverflow.com/questions/50198319/gcc-8-wstringop-truncation-what-is-the-good-practice

bigcardo commented 3 years ago

Additional commit to the previous one already sent by my colleague about gcc warnings on strncpy(). It is not clear why this additional issue was not found at the same time of the previous commit.