[PATCH] user32: Avoid pointer truncation in free_user_handle.

Rémi Bernon rbernon at codeweavers.com
Fri Mar 25 11:44:22 CDT 2022


On 3/25/22 17:43, Rémi Bernon wrote:
> On 3/25/22 12:22, Jacek Caban wrote:
>> Hi Rémi,
>>
>> On 3/25/22 09:53, Rémi Bernon wrote:
>>> Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
>>> ---
>>>   dlls/user32/win.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/dlls/user32/win.c b/dlls/user32/win.c
>>> index 77dfc131928..fac534a7c87 100644
>>> --- a/dlls/user32/win.c
>>> +++ b/dlls/user32/win.c
>>> @@ -72,7 +72,7 @@ void release_user_handle_ptr( void *ptr )
>>>    */
>>>   void *free_user_handle( HANDLE handle, unsigned int type )
>>>   {
>>> -    return UlongToHandle( NtUserCallTwoParam( HandleToUlong(handle), 
>>> type, NtUserFreeHandle ));
>>> +    return (void *)NtUserCallTwoParam( HandleToUlong(handle), type, 
>>> NtUserFreeHandle );
>>>   }
>>
>>
>> The patch itself looks good, but I think it would be more interesting 
>> to just get rid of free_user_handle from user32. At this point, the 
>> only remaining object managed by user32 is menu. I sent a patch moving 
>> it to win32u.
>>
>>
>> Thanks,
>>
>> Jacek
>>
> 
> Sure, I just wanted to make sure this didn't go unoticed. Note that for 
> me it broke on prefix update rundll invocations, so maybe still worth 
> having for the release.
> 

Nvm I can't read.
-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list