diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2020-06-08 09:03:29 +0200 |
---|---|---|
committer | Jameson Nash <vtjnash@gmail.com> | 2020-11-05 16:41:44 -0500 |
commit | 48cf8c8286ec24925b9939ccf72a4fbdc3a57626 (patch) | |
tree | c759c2e6e3b23d9597855a771ab3d787de282844 /test/test-tcp-bind-error.c | |
parent | 06b731742208c0c7b0b56948da2f2e0c9e645ec9 (diff) | |
download | libuv-48cf8c8286ec24925b9939ccf72a4fbdc3a57626.tar.gz libuv-48cf8c8286ec24925b9939ccf72a4fbdc3a57626.zip |
unix,win: more uv_read_start() argument validation
Return `UV_EINVAL` when one or more arguments are NULL.
Fixes: https://github.com/libuv/help/issues/137
PR-URL: https://github.com/libuv/libuv/pull/2795
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Diffstat (limited to 'test/test-tcp-bind-error.c')
-rw-r--r-- | test/test-tcp-bind-error.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test-tcp-bind-error.c b/test/test-tcp-bind-error.c index 29ed21e1..7732267f 100644 --- a/test/test-tcp-bind-error.c +++ b/test/test-tcp-bind-error.c @@ -283,7 +283,9 @@ TEST_IMPL(tcp_bind_writable_flags) { ASSERT(r == UV_EPIPE); r = uv_shutdown(&shutdown_req, (uv_stream_t*) &server, NULL); ASSERT(r == UV_ENOTCONN); - r = uv_read_start((uv_stream_t*) &server, NULL, NULL); + r = uv_read_start((uv_stream_t*) &server, + (uv_alloc_cb) abort, + (uv_read_cb) abort); ASSERT(r == UV_ENOTCONN); uv_close((uv_handle_t*)&server, close_cb); |