https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8da00cd97c22016976bab…
commit 8da00cd97c22016976bab93c41a1299348bb4605
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Sun Apr 11 11:37:23 2021 +0200
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Sun Apr 11 15:12:02 2021 +0200
[SETUPAPI] Fix CM_Open_Class_Key_ExW, when pClassGuid is used
Braces around GUID were missing.
---
dll/win32/setupapi/cfgmgr.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dll/win32/setupapi/cfgmgr.c b/dll/win32/setupapi/cfgmgr.c
index b052553e9ac..b63feb46c44 100644
--- a/dll/win32/setupapi/cfgmgr.c
+++ b/dll/win32/setupapi/cfgmgr.c
@@ -35,7 +35,8 @@ I_ScPnPGetServiceName(IN SERVICE_STATUS_HANDLE hServiceStatus,
/* Registry key and value names */
-static const WCHAR Backslash[] = {'\\', 0};
+static const WCHAR BackslashOpenBrace[] = {'\\', '{', 0};
+static const WCHAR CloseBrace[] = {'}', 0};
static const WCHAR Class[] =
{'C','l','a','s','s',0};
static const WCHAR ControlClass[] =
{'S','y','s','t','e','m','\\',
@@ -6343,8 +6344,9 @@ CM_Open_Class_Key_ExW(
return CR_INVALID_DATA;
}
- lstrcatW(szKeyName, Backslash);
+ lstrcatW(szKeyName, BackslashOpenBrace);
lstrcatW(szKeyName, lpGuidString);
+ lstrcatW(szKeyName, CloseBrace);
}
if (Disposition == RegDisposition_OpenAlways)