wininet: Don't overallocate in urlcache_encode_url_alloc (scan-build).

The URL is encoded in UTF-8, not UTF-16.
This commit is contained in:
Alex Henrie 2023-06-16 22:09:35 -06:00 committed by Alexandre Julliard
parent b97b2fbf00
commit 0a07f5984e

View file

@ -1926,7 +1926,7 @@ static BOOL urlcache_encode_url_alloc(const WCHAR *url, char **encoded_url)
if(!encoded_len)
return FALSE;
ret = malloc(encoded_len * sizeof(WCHAR));
ret = malloc(encoded_len);
if(!ret)
return FALSE;