Unverified Commit c7a235f0 authored by Santiago Gimeno's avatar Santiago Gimeno Committed by Anna Henningsen
Browse files

net: fix crash if POLLHUP is received

If the `onread` socket option is used and a `POLLHUP` event is received,
libuv returns `UV_EOF` along with a `NULL` buffer in the read callback,
causing the crash. Deal with this case.

Fixes: https://github.com/nodejs/node/issues/31823

PR-URL: https://github.com/nodejs/node/pull/32590


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent d3af1fe9
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment