usp10: Use heap_calloc() in _ItemizeInternal().
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
2a4fb48583
commit
7a5a63de99
|
@ -1373,7 +1373,7 @@ static HRESULT _ItemizeInternal(const WCHAR *pwcInChars, int cInChars,
|
||||||
if (!pwcInChars || !cInChars || !pItems || cMaxItems < 2)
|
if (!pwcInChars || !cInChars || !pItems || cMaxItems < 2)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
if (!(scripts = heap_alloc(cInChars * sizeof(*scripts))))
|
if (!(scripts = heap_calloc(cInChars, sizeof(*scripts))))
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
for (i = 0; i < cInChars; i++)
|
for (i = 0; i < cInChars; i++)
|
||||||
|
@ -1464,16 +1464,13 @@ static HRESULT _ItemizeInternal(const WCHAR *pwcInChars, int cInChars,
|
||||||
|
|
||||||
if (psState && psControl)
|
if (psState && psControl)
|
||||||
{
|
{
|
||||||
levels = heap_alloc_zero(cInChars * sizeof(WORD));
|
if (!(levels = heap_calloc(cInChars, sizeof(*levels))))
|
||||||
if (!levels)
|
|
||||||
goto nomemory;
|
goto nomemory;
|
||||||
|
|
||||||
overrides = heap_alloc_zero(cInChars * sizeof(WORD));
|
if (!(overrides = heap_calloc(cInChars, sizeof(*overrides))))
|
||||||
if (!overrides)
|
|
||||||
goto nomemory;
|
goto nomemory;
|
||||||
|
|
||||||
layout_levels = heap_alloc_zero(cInChars * sizeof(WORD));
|
if (!(layout_levels = heap_calloc(cInChars, sizeof(*layout_levels))))
|
||||||
if (!layout_levels)
|
|
||||||
goto nomemory;
|
goto nomemory;
|
||||||
|
|
||||||
if (psState->fOverrideDirection)
|
if (psState->fOverrideDirection)
|
||||||
|
@ -1519,8 +1516,7 @@ static HRESULT _ItemizeInternal(const WCHAR *pwcInChars, int cInChars,
|
||||||
static const WCHAR math_punc[] = {'#','$','%','+',',','-','.','/',':',0x2212, 0x2044, 0x00a0,0};
|
static const WCHAR math_punc[] = {'#','$','%','+',',','-','.','/',':',0x2212, 0x2044, 0x00a0,0};
|
||||||
static const WCHAR repeatable_math_punc[] = {'#','$','%','+','-','/',0x2212, 0x2044,0};
|
static const WCHAR repeatable_math_punc[] = {'#','$','%','+','-','/',0x2212, 0x2044,0};
|
||||||
|
|
||||||
strength = heap_alloc_zero(cInChars * sizeof(WORD));
|
if (!(strength = heap_calloc(cInChars, sizeof(*strength))))
|
||||||
if (!strength)
|
|
||||||
goto nomemory;
|
goto nomemory;
|
||||||
BIDI_GetStrengths(pwcInChars, cInChars, psControl, strength);
|
BIDI_GetStrengths(pwcInChars, cInChars, psControl, strength);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue