[PATCH 0/1] MR3224: shell32: Don't overallocate in Dde_OnRequest (scan-build).
From: Alex Henrie <alexhenrie24(a)gmail.com> --- dlls/shell32/dde.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/shell32/dde.c b/dlls/shell32/dde.c index c390f8e3186..dcaf641f8f4 100644 --- a/dlls/shell32/dde.c +++ b/dlls/shell32/dde.c @@ -176,7 +176,7 @@ static inline HDDEDATA Dde_OnRequest(UINT uFmt, HCONV hconv, HSZ hszTopic, } len = WideCharToMultiByte(CP_ACP, 0, groups_data, -1, NULL, 0, NULL, NULL); - groups_dataA = malloc(len * sizeof(WCHAR)); + groups_dataA = malloc(len); if (groups_dataA) { WideCharToMultiByte(CP_ACP, 0, groups_data, -1, groups_dataA, len, NULL, NULL); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3224
participants (2)
-
Alex Henrie -
Alex Henrie (@alexhenrie)