-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ArduinoOTA: don't crash on unrecognized packets #4086
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
Conversation
Nice job figuring this out! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the for loop index is now incremented double, definitely on line 155, which should now be
data[index]
@Juppit Yes, that solve the problem. And an observation, in the function readStringUntil, now value is an integer but later it is compared with two char ('\ 0' and end). From my little knowledge, I think this is better to leave it as it was. |
Oops, I didn’t notice that. I’m not used to
I believe these are fine. |
I missed that as well. If someone makes a PR, I'll look at it and merge it asap. |
* ArduinoOTA: handle end of packet in readStringUntil fixes esp8266#3912 * ArduinoOTA: fix buffer overflow in parseInt fixes esp8266#3912
* Update ArduinoOTA.cpp * Update ArduinoOTA.cpp
No description provided.