Skip to content

Commit 79751f3

Browse files
authored
Fix gzip+signed OTA error (esp8266#7577)
The last 4 bytes of a GZIP file is the decompressed file length, and are used in eboot to do sanity checks and know when decompression is done. Updater was incorrectly telling eboot to look at "end-of-bin + sizeof(signing)", and when eboot did so it got an incorrect value causing either the update to be skipped or for only a portion of update to be completed. Fix by adjusting the size back to the end of binary. Fixes esp8266#7570
1 parent 2843a5a commit 79751f3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cores/esp8266/Updater.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ bool UpdaterClass::end(bool evenIfRemaining){
280280
return false;
281281
}
282282
free(sig);
283+
_size = binSize;
283284
#ifdef DEBUG_UPDATER
284285
DEBUG_UPDATER.printf_P(PSTR("[Updater] Signature matches\n"));
285286
#endif

0 commit comments

Comments
 (0)