Skip to content

Fixes for zero length packet bug, buffer overflow in parseInt(), added end() method #757

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
Oct 30, 2017

Conversation

davruet
Copy link
Contributor

@davruet davruet commented Oct 22, 2017

Previously, ArduinoOTA would stop receiving any packets if the port received a zero-length UDP packet, commonly sent by network scanners like nmap. Fixed to flush() after every call to parsePacket(), even if read length is 0.

Additionally, added length checking to fix a potential buffer overflow in parseInt().

Finally, added an end() method that stops the OTA listener and releases resources.

…ro-length UDP packet, commonly sent by network scanners like nmap. Fixed to flush() after every call to parsePacket(), even if read length is 0.

Additionally, added length checking to fix a potential buffer overflow in parseInt().

Finally, added an end() method that stops the OTA listener and releases resources.
@everslick
Copy link
Contributor

MDNS.end(); should be wrapped in if(_mdnsEnabled){ IMHO.

@me-no-dev
Copy link
Member

@davruet please see @everslick comment :)

@davruet
Copy link
Contributor Author

davruet commented Oct 25, 2017

Got it - added it!

@me-no-dev me-no-dev merged commit 126674c into espressif:master Oct 30, 2017
@me-no-dev
Copy link
Member

merged :)

Curclamas pushed a commit to Curclamas/arduino-esp32 that referenced this pull request Nov 3, 2017
…d end() method (espressif#757)

* ArduinoOTA would stop receiving any packets if the port received a zero-length UDP packet, commonly sent by network scanners like nmap. Fixed to flush() after every call to parsePacket(), even if read length is 0.

Additionally, added length checking to fix a potential buffer overflow in parseInt().

Finally, added an end() method that stops the OTA listener and releases resources.

* Only end MDNS in end() if mdns mode is enabled.
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.

3 participants