mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
Fix overflow when firmware filename is too long (#4971)
This commit is contained in:
parent
0906bdc6d7
commit
b397af1bac
1 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue