[PATCH] winex11: Pass correct buffer length to RegQueryValueExW()

Nikolay Sivov nsivov at codeweavers.com
Mon Dec 26 16:52:08 CST 2016


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 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 186899fb16..1c1df9365e 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)
-- 
2.11.0




More information about the wine-patches mailing list