Nikolay Sivov : gdi32: Handle NULL name when setting registry value.
Alexandre Julliard
julliard at winehq.org
Fri Sep 24 15:31:59 CDT 2021
Module: wine
Branch: master
Commit: 5e481ab965b85c26c20c71799093383562b9522c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5e481ab965b85c26c20c71799093383562b9522c
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Fri Sep 24 10:53:59 2021 +0300
gdi32: Handle NULL name when setting registry value.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51789
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/gdi32/font.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 274c1d83aba..6011f258499 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -506,7 +506,7 @@ static HKEY reg_create_key( HKEY root, const WCHAR *name, ULONG name_len,
static void set_reg_value( HKEY hkey, const WCHAR *name, UINT type, const void *value, DWORD count )
{
- unsigned int name_size = lstrlenW( name ) * sizeof(WCHAR);
+ unsigned int name_size = name ? lstrlenW( name ) * sizeof(WCHAR) : 0;
UNICODE_STRING nameW = { name_size, name_size, (WCHAR *)name };
NtSetValueKey( hkey, &nameW, 0, type, value, count );
}
More information about the wine-cvs
mailing list