[PATCH v2] ntdll: Avoid reqeuests with null pointer but invalid size.
Alexandre Julliard
julliard at winehq.org
Mon May 2 05:26:03 CDT 2022
Bernhard Übelacker <bernhardu at mailbox.org> writes:
> diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
> index cc8bf0c6e82..92b67280500 100644
> --- a/dlls/ntdll/unix/file.c
> +++ b/dlls/ntdll/unix/file.c
> @@ -4893,7 +4893,7 @@ static NTSTATUS server_ioctl_file( HANDLE handle, HANDLE event,
> {
> req->code = code;
> req->async = server_async( handle, &async->io, event, apc, apc_context, iosb_client_ptr(io) );
> - wine_server_add_data( req, in_buffer, in_size );
> + if (in_buffer) wine_server_add_data( req, in_buffer, in_size );
> if ((code & 3) != METHOD_BUFFERED) wine_server_add_data( req, out_buffer, out_size );
> wine_server_set_reply( req, out_buffer, out_size );
> status = virtual_locked_server_call( req );
It still doesn't make sense to silently ignore the input data. Either
it's needed and it should fail without sending the request, or it's not
needed and it should never be sent at all.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list