net: fix crash if POLLHUP is received · nodejs/node@dd74601 · GitHub
Skip to content

Commit dd74601

Browse files
santigimenotargos
authored andcommitted
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: #31823 PR-URL: #32590 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 1fb4f9d commit dd74601

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/stream_base.cc

Lines changed: 9 additions & 1 deletion

0 commit comments

Comments
 (0)