Nikolay Sivov : msi: Fixup Installer\\Patches\\<...> key path (Coverity).
Alexandre Julliard
julliard at winehq.org
Wed Sep 15 16:21:31 CDT 2021
Module: wine
Branch: master
Commit: 856e8ea298eebf0eaedd5f352476e6e986b1bd67
URL: https://source.winehq.org/git/wine.git/?a=commit;h=856e8ea298eebf0eaedd5f352476e6e986b1bd67
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Tue Sep 14 22:44:50 2021 +0300
msi: Fixup Installer\\Patches\\<...> key path (Coverity).
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msi/registry.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c
index 623bc1866d3..5dc3c0a81c3 100644
--- a/dlls/msi/registry.c
+++ b/dlls/msi/registry.c
@@ -773,8 +773,8 @@ UINT MSIREG_OpenPatchesKey(LPCWSTR szPatch, HKEY *key, BOOL create)
if (!squash_guid( szPatch, squashed_pc )) return ERROR_FUNCTION_FAILED;
TRACE("%s squashed %s\n", debugstr_w(szPatch), debugstr_w(squashed_pc));
- swprintf( keypath, ARRAY_SIZE(keypath), L"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Patches",
- squashed_pc );
+ lstrcpyW( keypath, L"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Patches\\" );
+ lstrcatW( keypath, squashed_pc );
if (create) return RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, access, NULL, key, NULL);
return RegOpenKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, access, key);
More information about the wine-cvs
mailing list