Commit 315be161 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

usp10: Use heap_calloc() in ScriptShape().

parent 798439ba
......@@ -3333,10 +3333,10 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars,
if (!psva || !pcGlyphs) return E_INVALIDARG;
if (cChars > cMaxGlyphs) return E_OUTOFMEMORY;
charProps = heap_alloc_zero(sizeof(SCRIPT_CHARPROP)*cChars);
if (!charProps) return E_OUTOFMEMORY;
glyphProps = heap_alloc_zero(sizeof(SCRIPT_GLYPHPROP)*cMaxGlyphs);
if (!glyphProps)
if (!(charProps = heap_calloc(cChars, sizeof(*charProps))))
return E_OUTOFMEMORY;
if (!(glyphProps = heap_calloc(cMaxGlyphs, sizeof(*glyphProps))))
{
heap_free(charProps);
return E_OUTOFMEMORY;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment