[PATCH v2] ntdll: Avoid reqeuests with null pointer but invalid size.
Bernhard Übelacker
bernhardu at mailbox.org
Mon May 30 02:05:48 CDT 2022
Am 02.05.22 um 12:26 schrieb Alexandre Julliard:
> 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.
Hello Alexandre,
sorry for the delay and thanks for the input.
I am about to send a v3 that moves the modification further to the
caller and never sends inputs for IOCTL_STORAGE_GET_DEVICE_NUMBER.
Kind regards,
Bernhard
More information about the wine-devel
mailing list