Commit Graph

1 Commits

Author SHA1 Message Date
Santiago Gimeno
34af1f69b9
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: https://github.com/nodejs/node/issues/40764
PR-URL: https://github.com/nodejs/node/pull/45878
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-12-28 11:59:51 +00:00