Commit 163c7021 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

usp10: Check heap_alloc return value (Coverity).

parent ff281336
......@@ -1378,6 +1378,7 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars,
if ((get_cache_pitch_family(psc) & TMPF_TRUETYPE) && !psa->fNoGlyphIndex)
{
WCHAR *rChars = heap_alloc(sizeof(WCHAR) * cChars);
if (!rChars) return E_OUTOFMEMORY;
for (i = 0; i < cChars; i++)
{
int idx = i;
......
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