Module: wine Branch: master Commit: ef30380d4a22def174dd0af5a97094537a2e50af URL: https://source.winehq.org/git/wine.git/?a=commit;h=ef30380d4a22def174dd0af5a...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Dec 7 15:28:37 2021 +0100
win32u: Fix device instance value size in link_device.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/win32u/sysparams.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 5c65dce716d..15416a695f2 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -798,7 +798,7 @@ static void link_device( const WCHAR *instance, const WCHAR *class ) len += class_len; hkey = reg_create_key( control_key, buffer, len * sizeof(WCHAR), 0, NULL );
- set_reg_value( hkey, device_instanceW, REG_SZ, instance, instance_len * sizeof(WCHAR) ); + set_reg_value( hkey, device_instanceW, REG_SZ, instance, (instance_len + 1) * sizeof(WCHAR) );
subkey = reg_create_key( hkey, hashW, sizeof(hashW), REG_OPTION_VOLATILE, NULL ); NtClose( hkey );