Commit dd74601
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
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
520 | | - | |
521 | 520 | | |
522 | 521 | | |
523 | 522 | | |
524 | 523 | | |
525 | 524 | | |
526 | 525 | | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
527 | 535 | | |
528 | 536 | | |
529 | 537 | | |
| |||
0 commit comments