Fix CHIRP upload stall on unaligned final EEPROM write block

This commit is contained in:
Armel FAUVEAU committed 2026-09-03 19:02:21 +02:00
1 parent cc6527afc1
commit a41fb99862
1 file changed
+6 -1
+6 -1
View File
@@ -439,7 +439,12 @@ static void CMD_051D(uint32_t Port, const uint8_t *pBuffer)
uint32_t Timestamp = 0;
if ((pCmd->Size & 7u) || pCmd->Header.Size < 8u + pCmd->Size)
/* Bound the write against the received frame: Data[] must hold pCmd->Size
* bytes, otherwise the loop below would read adjacent RAM and persist it to
* EEPROM (memory disclosure). A non-multiple-of-8 Size is NOT rejected: the
* Size/8 loop simply truncates the sub-page tail, matching the historical
* behavior CHIRP relies on for its final (unaligned) config block. */
if (pCmd->Header.Size < 8u + pCmd->Size)
return;
if(0) {}