usp10: Use heap_calloc() in requires_fallback().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Henri Verbeet 2018-03-09 10:01:55 +03:30 committed by Alexandre Julliard
parent 286f4cd2a4
commit 9140256ba8
1 changed files with 1 additions and 2 deletions

View File

@ -1948,8 +1948,7 @@ static BOOL requires_fallback(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_ANALYSIS *psa,
if (SHAPE_CheckFontForRequiredFeatures(hdc, (ScriptCache *)*psc, psa) != S_OK)
return TRUE;
glyphs = heap_alloc(sizeof(WORD) * cChars);
if (!glyphs)
if (!(glyphs = heap_calloc(cChars, sizeof(*glyphs))))
return FALSE;
if (ScriptGetCMap(hdc, psc, pwcInChars, cChars, 0, glyphs) != S_OK)
{