usp10: Use heap_calloc() in ScriptShapeOpenType().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2018-03-07 10:56:44 +03:30 committed by Alexandre Julliard
parent 813ab925ab
commit 8d08ff3745
1 changed files with 3 additions and 2 deletions

View File

@ -3188,8 +3188,9 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc,
WCHAR *rChars;
if ((hr = SHAPE_CheckFontForRequiredFeatures(hdc, (ScriptCache *)*psc, psa)) != S_OK) return hr;
rChars = heap_alloc(sizeof(WCHAR) * cChars);
if (!rChars) return E_OUTOFMEMORY;
if (!(rChars = heap_calloc(cChars, sizeof(*rChars))))
return E_OUTOFMEMORY;
for (i = 0, g = 0, cluster = 0; i < cChars; i++)
{
int idx = i;