From 5b00797205918a594ee2559d5e87a010fe1f0bb5 Mon Sep 17 00:00:00 2001 From: ~locpyl-tidnyd <81016946+locpyl-tidnyd@users.noreply.github.com> Date: Sat, 16 Oct 2021 13:17:38 +0300 Subject: [PATCH] pipe: remove useless assertion (#3302) This assertion was added when req->write_buffer was a pointer. It was then checking that write_buffer itself was not NULL. Checking that .base is not NULL is superfluous because WriteFile will return error 998 (ERROR_NO_ACCESS) if the input buffer is invalid. This assertion fires on zero-length writes when base==NULL&&len==0. --- src/win/pipe.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/win/pipe.c b/src/win/pipe.c index 88ba99bb..912aed9b 100644 --- a/src/win/pipe.c +++ b/src/win/pipe.c @@ -1252,7 +1252,6 @@ static DWORD WINAPI uv_pipe_writefile_thread_proc(void* parameter) { assert(req != NULL); assert(req->type == UV_WRITE); assert(handle->type == UV_NAMED_PIPE); - assert(req->write_buffer.base); result = WriteFile(handle->handle, req->write_buffer.base,