From 4cddc01f2236dc792aeac998c254e8f7e9ea6e0f Mon Sep 17 00:00:00 2001 From: Hajo Noerenberg Date: Wed, 17 Jan 2024 22:49:33 +0100 Subject: [PATCH] [libs] Fix MD5 calculation during OTA update (#240) --- cores/common/arduino/libraries/common/Update/Update.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/common/arduino/libraries/common/Update/Update.cpp b/cores/common/arduino/libraries/common/Update/Update.cpp index c094da4b1..9c053909c 100644 --- a/cores/common/arduino/libraries/common/Update/Update.cpp +++ b/cores/common/arduino/libraries/common/Update/Update.cpp @@ -149,8 +149,8 @@ size_t UpdateClass::write(const uint8_t *data, size_t len) { if (!this->ctx) return 0; - size_t written = lt_ota_write(ctx, data, len); MD5Update(this->md5Ctx, data, len); + size_t written = lt_ota_write(ctx, data, len); if (written != len) this->cleanup(/* clearError= */ false); return written;