[PATCH 0/1] MR3525: ntdll: allow NULL timeout in NtCreateNamedPipeFile.
Saw that this was allowed on MSDN and checked with a windows machine -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3525
From: Etaash Mathamsetty <etaash.mathamsetty(a)gmail.com> --- dlls/ntdll/unix/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index 3a24d4ebbf2..43bde14e5d8 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -4132,7 +4132,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( HANDLE *handle, ULONG access, OBJECT_ATTR (int)inbound_quota, (int)outbound_quota, timeout ); /* assume we only get relative timeout */ - if (timeout->QuadPart > 0) FIXME( "Wrong time %s\n", wine_dbgstr_longlong(timeout->QuadPart) ); + if (timeout && timeout->QuadPart > 0) FIXME( "Wrong time %s\n", wine_dbgstr_longlong(timeout->QuadPart) ); if ((status = alloc_object_attributes( attr, &objattr, &len ))) return status; @@ -4149,7 +4149,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( HANDLE *handle, ULONG access, OBJECT_ATTR req->maxinstances = max_inst; req->outsize = outbound_quota; req->insize = inbound_quota; - req->timeout = timeout->QuadPart; + req->timeout = timeout ? timeout->QuadPart : 0ULL; wine_server_add_data( req, objattr, len ); if (!(status = wine_server_call( req ))) { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3525
Please add a test. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3525#note_42372
participants (3)
-
Alexandre Julliard (@julliard) -
Etaash Mathamsetty -
Etaash Mathamsetty (@etaash.mathamsetty)