[PATCH 2/2] regedit: Pass RegQueryValueEx() the actual buffer size (Coverity)

Hugh McMaster hugh.mcmaster at outlook.com
Mon May 1 04:30:31 CDT 2017


Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
 programs/regedit/listview.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/programs/regedit/listview.c b/programs/regedit/listview.c
index fc234d4..11147a7 100644
--- a/programs/regedit/listview.c
+++ b/programs/regedit/listview.c
@@ -550,6 +550,7 @@ BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR highli
     if (!valBuf)
         goto done;
 
+    valSize = max_val_size;
     if (RegQueryValueExW(hKey, NULL, NULL, &valType, valBuf, &valSize) == ERROR_FILE_NOT_FOUND) {
         AddEntryToList(hwndLV, NULL, REG_SZ, NULL, 0, !highlightValue);
     }
-- 
2.7.4




More information about the wine-patches mailing list