Fix overflow when firmware filename is too long (#4971)
This commit is contained in:
@@ -95,7 +95,7 @@ uint32_t firmwareWritten = 0;
|
|||||||
uint32_t eepromAddress = 0;
|
uint32_t eepromAddress = 0;
|
||||||
uint32_t eepromWritten = 0;
|
uint32_t eepromWritten = 0;
|
||||||
|
|
||||||
TCHAR backupFilename[60];
|
TCHAR backupFilename[_MAX_LFN+1];
|
||||||
|
|
||||||
uint32_t Master_frequency;
|
uint32_t Master_frequency;
|
||||||
volatile uint8_t Tenms;
|
volatile uint8_t Tenms;
|
||||||
@@ -229,7 +229,7 @@ const char *getBinaryPath()
|
|||||||
|
|
||||||
FRESULT openBinaryFile(uint32_t index)
|
FRESULT openBinaryFile(uint32_t index)
|
||||||
{
|
{
|
||||||
TCHAR filename[60];
|
TCHAR filename[_MAX_LFN+1];
|
||||||
FRESULT fr;
|
FRESULT fr;
|
||||||
memset(Block_buffer, 0, sizeof(Block_buffer));
|
memset(Block_buffer, 0, sizeof(Block_buffer));
|
||||||
strAppend(strAppend(strAppend(filename, getBinaryPath()), "/"), Filenames[index]);
|
strAppend(strAppend(strAppend(filename, getBinaryPath()), "/"), Filenames[index]);
|
||||||
@@ -641,4 +641,3 @@ int main()
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user