Re: [PATCH] winmm: RegQueryValueExW wants the size in bytes, not the size in characters.
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(a)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;
participants (1)
-
Andrew Eikum