Skip to content

UdpContext - check after pbuf_alloc for errors #3354

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 3 commits into from
Sep 22, 2017

Conversation

mblythe86
Copy link
Contributor

I've hit cases where pbuf_alloc() returns a nullptr. In the original code, it would happily try to dereference this, and I'd get "Exception 28". I've updated UdpContext to check for this condition, and pass along that something has gone wrong. In the case of send(), that means returning false, and for append(), return that 0 bytes were actually appended.

@igrr igrr merged commit 13c1e8b into esp8266:master Sep 22, 2017
d-a-v pushed a commit to d-a-v/Arduino that referenced this pull request Sep 29, 2017
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