[PATCH] winex11drv: Fix uninitialized memory access appearing in multiple tests (Valgrind) (resend)

Indrek Altpere efbiaiinzinz at hotmail.com
Thu May 21 01:39:52 CDT 2015


http://api.kde.org/4.0-api/kdebase-workspace-apidocs/kwin/html/structKWin_1_
1Motif_1_1MwmHints.html
In addition to input_mode there is also status property in the struct, which
is also not set in this function before calling XChangeProperty.
I figured it should be simpler to force the entire struct to 0 to clear out
all fields at once.
If it is sure that only input_mode needs to be zeroed, I can resend the
patch as such.

Also sorry for the spam, had issues with sendmail while trying to use git
send-email and accidentally sent same patch three times plus also forgot to
reference the bug https://bugs.winehq.org/show_bug.cgi?id=38593

Regards,
Indrek
-----Original Message-----
From: Nikolay Sivov [mailto:nsivov at codeweavers.com] 
Sent: Thursday, May 21, 2015 9:14 AM
To: wine-devel at winehq.org
Cc: Indrek Altpere
Subject: Re: [PATCH] winex11drv: Fix uninitialized memory access appearing
in multiple tests (Valgrind) (resend)

On 05/21/2015 08:05 AM, efbiaiinzinz at hotmail.com wrote:
> From: Indrek Altpere <efbiaiinzinz at hotmail.com>
>
> ---
>   dlls/winex11.drv/window.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c 
> index 06e2294..de39a44 100644
> --- a/dlls/winex11.drv/window.c
> +++ b/dlls/winex11.drv/window.c
> @@ -701,6 +701,7 @@ static void set_size_hints( struct x11drv_win_data
*data, DWORD style )
>   static void set_mwm_hints( struct x11drv_win_data *data, DWORD style,
DWORD ex_style )
>   {
>       MwmHints mwm_hints;
> +    memset(&mwm_hints, 0, sizeof(mwm_hints));
>
>       if (data->hwnd == GetDesktopWindow())
>       {
>

This looks too much, isn't it enough to just set input_mode = 0 once, before
making a call?



More information about the wine-devel mailing list