Skip to content

Commit 83e5d1f

Browse files
authored
Backport esp8266#7577
1 parent db118cf commit 83e5d1f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cores/esp8266/Updater.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ bool UpdaterClass::begin(size_t size, int command, int ledPin, uint8_t ledOn) {
113113

114114
_reset();
115115
clearError(); // _error = 0
116+
_target_md5 = emptyString;
117+
_md5 = MD5Builder();
116118

117119
#ifndef HOST_MOCK
118120
wifi_set_sleep_type(NONE_SLEEP_T);
@@ -280,6 +282,8 @@ bool UpdaterClass::end(bool evenIfRemaining){
280282
return false;
281283
}
282284
free(sig);
285+
_size = binSize; // Adjust size to remove signature, not part of bin payload
286+
283287
#ifdef DEBUG_UPDATER
284288
DEBUG_UPDATER.printf_P(PSTR("[Updater] Signature matches\n"));
285289
#endif

0 commit comments

Comments
 (0)