Signed-off-by: Fabian Maurer dark.shadow4@web.de
-- v6: urlmon: Pass correct parameter to realloc and simplify code (Coverity)
From: Fabian Maurer dark.shadow4@web.de
Signed-off-by: Fabian Maurer dark.shadow4@web.de --- dlls/urlmon/sec_mgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/urlmon/sec_mgr.c b/dlls/urlmon/sec_mgr.c index e6d1864b1e7..78e4c96fd60 100644 --- a/dlls/urlmon/sec_mgr.c +++ b/dlls/urlmon/sec_mgr.c @@ -1276,13 +1276,12 @@ static LPDWORD build_zonemap_from_reg(void) if (used == allocated) { LPDWORD new_data;
+ allocated *= 2; new_data = realloc(data, allocated * sizeof(DWORD)); if (!new_data) goto cleanup; - memset(new_data + allocated, 0, allocated * sizeof(DWORD));
data = new_data; - allocated *= 2; } data[used] = wcstol(name, NULL, 10); }
This merge request was approved by Jacek Caban.