src: fix crash on OnStreamRead on Windows · nodejs/node@261d6d0 · GitHub
Skip to content

Commit 261d6d0

Browse files
santigimenoRafaelGSS
authored andcommitted
src: fix crash on OnStreamRead on Windows
On Windows it's perfectly possible that the `uv_tcp_t` `read_cb` is called with an error and a null `uv_buf_t` if it corresponds to a `UV_HANDLE_ZERO_READ` read. Handle this case without crashing. Fixes: #40764 PR-URL: #45878 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 3d09754 commit 261d6d0

2 files changed

Lines changed: 51 additions & 3 deletions

File tree

src/stream_base.cc

Lines changed: 4 additions & 3 deletions
Lines changed: 47 additions & 0 deletions

0 commit comments

Comments
 (0)