[PATCH 5/6] usp10: Use heap_calloc() in requires_fallback().
Henri Verbeet
hverbeet at codeweavers.com
Fri Mar 9 00:31:55 CST 2018
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
dlls/usp10/usp10.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index cf42c93..5442830 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -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)
{
--
2.1.4
More information about the wine-devel
mailing list