Hugh McMaster : uninstaller: Pass RegQueryValueExW() the size of the buffer (Coverity).

Alexandre Julliard julliard at winehq.org
Mon May 15 16:09:23 CDT 2017


Module: wine
Branch: master
Commit: 581533b65c7d6144c66ad03423453ca12fc2b6b9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=581533b65c7d6144c66ad03423453ca12fc2b6b9

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>

---

 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