usp10: Use heap_calloc() in ScriptShape().
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:
parent
798439ba31
commit
315be161ce
|
@ -3333,10 +3333,10 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars,
|
||||||
if (!psva || !pcGlyphs) return E_INVALIDARG;
|
if (!psva || !pcGlyphs) return E_INVALIDARG;
|
||||||
if (cChars > cMaxGlyphs) return E_OUTOFMEMORY;
|
if (cChars > cMaxGlyphs) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
charProps = heap_alloc_zero(sizeof(SCRIPT_CHARPROP)*cChars);
|
if (!(charProps = heap_calloc(cChars, sizeof(*charProps))))
|
||||||
if (!charProps) return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
glyphProps = heap_alloc_zero(sizeof(SCRIPT_GLYPHPROP)*cMaxGlyphs);
|
|
||||||
if (!glyphProps)
|
if (!(glyphProps = heap_calloc(cMaxGlyphs, sizeof(*glyphProps))))
|
||||||
{
|
{
|
||||||
heap_free(charProps);
|
heap_free(charProps);
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
Loading…
Reference in New Issue