[PATCH] user32: Avoid pointer truncation in free_user_handle.
Jacek Caban
jacek at codeweavers.com
Fri Mar 25 06:22:01 CDT 2022
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
More information about the wine-devel
mailing list