shell32: Don't overallocate in Dde_OnRequest (scan-build).

This commit is contained in:
Alex Henrie 2023-07-02 17:35:44 -06:00 committed by Alexandre Julliard
parent 9ffdfe4109
commit 7e68281b25

View file

@ -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);