Module: wine Branch: master Commit: 703e82094bbc76532d666ffc51862a4e990d974f URL: http://source.winehq.org/git/wine.git/?a=commit;h=703e82094bbc76532d666ffc51...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Wed Feb 8 14:46:30 2017 +0300
winex11: Pass correct buffer length to RegQueryValueExW().
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winex11.drv/mouse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 186899f..1c1df93 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -967,7 +967,7 @@ static Cursor create_xcursor_system_cursor( const ICONINFOEXW *info ) HKEY key; WCHAR *p, name[MAX_PATH * 2], valueW[64]; char valueA[64]; - DWORD size, ret; + DWORD ret;
if (!info->szModName[0]) return 0;
@@ -982,7 +982,7 @@ static Cursor create_xcursor_system_cursor( const ICONINFOEXW *info ) /* @@ Wine registry key: HKCU\Software\Wine\X11 Driver\Cursors */ if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\Wine\X11 Driver\Cursors", &key )) { - size = sizeof(valueW) / sizeof(WCHAR); + DWORD size = sizeof(valueW); ret = RegQueryValueExW( key, name, NULL, NULL, (BYTE *)valueW, &size ); RegCloseKey( key ); if (!ret)