Skip to content

Resolve updater size check bug #4550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 23, 2018
Merged

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants