[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: [PATCH] winmm: RegQueryValueExW wants the size in bytes, not the size in characters.
From: Andrew Eikum <aeikum () codeweavers ! com>
Date: 2016-12-28 13:50:57
Message-ID: 20161228135057.GK3352 () foghorn ! codeweavers ! com
[Download RAW message or body]
Thanks. These look good but we're in code freeze. I'll be happy to
sign-off on them after the freeze is over.
Andrew
On Mon, Dec 26, 2016 at 04:25:22PM +0100, Carlo Bramini wrote:
> There is a bug into dlls/winmm/playsound.c
> Function RegQueryValueExW accepts the size in bytes as parameter, not the size
> in characters.
>
> See:
> https://msdn.microsoft.com/en-us/library/windows/desktop/ms724911(v=vs.85).
> aspx
>
> Sincerely.
>
> Signed-off-by: Carlo Bramini <carlo_bramini@users.sourceforge.net>
>
> diff --git a/dlls/winmm/playsound.c b/dlls/winmm/playsound.c
> index 5d9aed0..6525db5 100644
> --- a/dlls/winmm/playsound.c
> +++ b/dlls/winmm/playsound.c
> @@ -140,7 +140,7 @@ static HMMIO get_mmioFromProfile(UINT uFlags, LPCWSTR lpszName)
> if (err != 0)
> goto none;
> }
> - count = sizeof(str)/sizeof(str[0]);
> + count = sizeof(str);
> err = RegQueryValueExW(hSnd, NULL, 0, &type, (LPBYTE)str, &count);
> RegCloseKey(hSnd);
> if (err != 0 || !*str) goto none;
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic