[PATCH 1/2] uninstaller: Pass RegQueryValueExW() the size of the buffer (Coverity)

Hugh McMaster hugh.mcmaster at outlook.com
Mon May 15 03:02:31 CDT 2017


Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
 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)
         {
-- 
2.7.4




More information about the wine-patches mailing list