Fix filename buffer overflow in create_filename

FILE_NAME is a fixed 48-byte buffer, but the loop copying the
filename parsed from the download URL had no length check, so a
filename longer than 48 characters would overflow into adjacent
variables (FILE_INI, DIR_zifi, DIR_download, DIR_date). Bound the
copy loop to 48 bytes.

Verified on hardware via a temporary diagnostic test (since removed):
folder/file creation with long names and write+read-back through the
FAT32 driver both work correctly, and downloads/<date> is confirmed
write-only (playback/viewing always reads from memory, never disk).

Documented the fix in README.md.
This commit is contained in:
2026-09-01 16:34:52 +03:00
parent 54e0031a22
commit 08dc6ab6a4
3 changed files with 6 additions and 4 deletions
Binary file not shown.