[PATCH resend] server: Avoid reqeuests with null pointer but invalid size.

Bernhard Übelacker bernhardu at mailbox.org
Wed Apr 20 16:53:25 CDT 2022


Am 19.04.22 um 17:43 schrieb Alexandre Julliard:
> Bernhard Übelacker <bernhardu at mailbox.org> writes:
> 
>> @@ -71,7 +71,7 @@ static inline data_size_t wine_server_reply_size( const void *reply )
>>   static inline void wine_server_add_data( void *req_ptr, const void *ptr, data_size_t size )
>>   {
>>       struct __server_request_info * const req = req_ptr;
>> -    if (size)
>> +    if (size && ptr != NULL)
>>       {
>>           req->data[req->data_count].ptr = ptr;
>>           req->data[req->data_count++].size = size;
> 
> That doesn't belong here, it's up to the callers to validate the
> pointers when necessary.
> 

Thank you very much for the review.
I sent in another version which moved the pointer
validation to the server_ioctl_file function.



More information about the wine-devel mailing list