Skip to content

Commit

Permalink
[libs] Fix MD5 calculation during OTA update (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
hn authored Jan 17, 2024
1 parent 1d80b5f commit 4cddc01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cores/common/arduino/libraries/common/Update/Update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4cddc01

Please sign in to comment.