From b397af1bacdd142f9b4840e377f30c7ac23b4dbb Mon Sep 17 00:00:00 2001 From: 3djc Date: Tue, 30 May 2017 18:36:36 +0200 Subject: [PATCH] Fix overflow when firmware filename is too long (#4971) --- radio/src/targets/taranis/bootloader/boot.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/radio/src/targets/taranis/bootloader/boot.cpp b/radio/src/targets/taranis/bootloader/boot.cpp index ffeb8f16b..e78cf4fc7 100644 --- a/radio/src/targets/taranis/bootloader/boot.cpp +++ b/radio/src/targets/taranis/bootloader/boot.cpp @@ -95,7 +95,7 @@ uint32_t firmwareWritten = 0; uint32_t eepromAddress = 0; uint32_t eepromWritten = 0; -TCHAR backupFilename[60]; +TCHAR backupFilename[_MAX_LFN+1]; uint32_t Master_frequency; volatile uint8_t Tenms; @@ -229,7 +229,7 @@ const char *getBinaryPath() FRESULT openBinaryFile(uint32_t index) { - TCHAR filename[60]; + TCHAR filename[_MAX_LFN+1]; FRESULT fr; memset(Block_buffer, 0, sizeof(Block_buffer)); strAppend(strAppend(strAppend(filename, getBinaryPath()), "/"), Filenames[index]); @@ -641,4 +641,3 @@ int main() return 0; } -