Module: wine Branch: master Commit: 466f31dce91334f5508fa9fc2d7139b6c33c8534 URL: https://gitlab.winehq.org/wine/wine/-/commit/466f31dce91334f5508fa9fc2d7139b...
Author: Rémi Bernon rbernon@codeweavers.com Date: Thu Dec 1 21:41:54 2022 +0100
mshtml: Fix realloc size vs element count mixup.
---
dlls/mshtml/htmlstorage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/mshtml/htmlstorage.c b/dlls/mshtml/htmlstorage.c index 9a883e4bc05..21e3df5c3fb 100644 --- a/dlls/mshtml/htmlstorage.c +++ b/dlls/mshtml/htmlstorage.c @@ -1119,7 +1119,7 @@ static HRESULT get_prop(HTMLStorage *This, const WCHAR *name, DISPID *dispid) }
if(is_power_of_2(This->num_props)) { - BSTR *new_props = realloc(This->props, max(This->num_props * 2 * sizeof(BSTR*), 1)); + BSTR *new_props = realloc(This->props, max(This->num_props * 2, 1) * sizeof(*This->props)); if(!new_props) return E_OUTOFMEMORY; This->props = new_props;