From 43d6b32a83986e7bad45fc1dfadec5e9e3297e51 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 18 May 2010 22:43:02 +0000 Subject: [PATCH] [SETUPAPI] - Fix an incorrect length value that corrupted REG_MULTI_SZ values when they had strings appended - I'm not sure if this is synced with WINE, but if it is, they need this patch too svn path=/trunk/; revision=47267 --- reactos/dll/win32/setupapi/install.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/setupapi/install.c b/reactos/dll/win32/setupapi/install.c index a89081c7d6d..0d1fd062321 100644 --- a/reactos/dll/win32/setupapi/install.c +++ b/reactos/dll/win32/setupapi/install.c @@ -250,7 +250,7 @@ static void append_multi_sz_value( HKEY hkey, const WCHAR *value, const WCHAR *s if (total != size) { TRACE( "setting value %s to %s\n", debugstr_w(value), debugstr_w(buffer) ); - RegSetValueExW( hkey, value, 0, REG_MULTI_SZ, (BYTE *)buffer, total ); + RegSetValueExW( hkey, value, 0, REG_MULTI_SZ, (BYTE *)buffer, total + sizeof(WCHAR) ); } done: HeapFree( GetProcessHeap(), 0, buffer ); -- 2.17.1