Hugh McMaster : uninstaller: Pass RegQueryValueExW() the size of the buffer (Coverity).
Alexandre Julliard
julliard at winehq.org
Fri Oct 20 07:19:59 CDT 2017
Module: wine
Branch: stable
Commit: 99a95a8b6fb0f16be3d7521c46137263093df7cb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=99a95a8b6fb0f16be3d7521c46137263093df7cb
Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date: Mon May 15 08:02:31 2017 +0000
uninstaller: Pass RegQueryValueExW() the size of the buffer (Coverity).
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 581533b65c7d6144c66ad03423453ca12fc2b6b9)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
programs/uninstaller/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/programs/uninstaller/main.c b/programs/uninstaller/main.c
index 6909e0f..1c834ea 100644
--- a/programs/uninstaller/main.c
+++ b/programs/uninstaller/main.c
@@ -228,6 +228,7 @@ static int FetchFromRootKey(HKEY root)
for (i=0; RegEnumKeyExW( root, i, subKeyName, &sizeOfSubKeyName, NULL, NULL, NULL, NULL ) != ERROR_NO_MORE_ITEMS; ++i)
{
RegOpenKeyExW(root, subKeyName, 0, KEY_READ, &hkeyApp);
+ size = sizeof(value);
if (!RegQueryValueExW(hkeyApp, SystemComponentW, NULL, &type, (LPBYTE)&value, &size) &&
type == REG_DWORD && value == 1)
{
More information about the wine-cvs
mailing list