[PATCH 5/6] usp10: Use heap_calloc() in requires_fallback().
Aric Stewart
aric at codeweavers.com
Fri Mar 9 08:22:52 CST 2018
Signed-off-by: Aric Stewart <aric at codeweavers.com>
On 3/9/18 12:31 AM, Henri Verbeet wrote:
> 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)
> {
>
More information about the wine-devel
mailing list