Skip to content

Conversation

@Adam5Wu
Copy link
Contributor

@Adam5Wu Adam5Wu commented Mar 23, 2018

I accidentially tried to OTA a 2MB+ file, and found the Updater.begin() actually did not report any error.

Turned out there is an arithmetic underflow on an unsigned type.

@devyte
Copy link
Collaborator

devyte commented Mar 23, 2018

Will begin() report an error with this fix?

@Adam5Wu
Copy link
Contributor Author

Adam5Wu commented Mar 23, 2018

Yes, the underflow fix will trigger the proper size error reporting logic in line 98-100

if(updateStartAddress < currentSketchSize) {
...
}
@devyte
Copy link
Collaborator

devyte commented Mar 23, 2018

Thanks for finding this :)

@devyte devyte merged commit 2d39bcb into esp8266:master Mar 23, 2018
bryceschober pushed a commit to bryceschober/Arduino that referenced this pull request Apr 5, 2018
@Adam5Wu Adam5Wu deleted the fix/updater_sizecheck branch May 27, 2018 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants