1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-27 02:05:10 +03:00

No more 2MB array on the stack

This commit is contained in:
Andre Bernet 2016-08-31 21:57:53 +02:00
parent c994260c85
commit 37a0258b19

View file

@ -342,7 +342,10 @@ bool FirmwareInterface::isValid()
unsigned int FirmwareInterface::save(QString fileName)
{
uint8_t binflash[FSIZE_MAX];
uint8_t *binflash = (uint8_t*)malloc(FSIZE_MAX);
if (binflash == NULL) {
return -1;
}
memcpy(&binflash, flash.constData(), flashSize);
QFile file(fileName);