[PATCH] winex11: Pass correct buffer length to RegQueryValueExW()
Nikolay Sivov
nsivov at codeweavers.com
Wed Feb 8 05:46:30 CST 2017
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
Similar change could also be applied to Mac driver.
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