[PATCH 5/6] usp10: Use heap_calloc() in SHAPE_does_GSUB_feature_apply_to_chars().
Aric Stewart
aric at codeweavers.com
Tue Mar 13 06:42:24 CDT 2018
Signed-off-by: Aric Stewart <aric at codeweavers.com>
On 3/13/18 5:23 AM, Henri Verbeet wrote:
> Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
> ---
> dlls/usp10/shape.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c
> index ca084e7285f..40313863002 100644
> --- a/dlls/usp10/shape.c
> +++ b/dlls/usp10/shape.c
> @@ -712,13 +712,14 @@ static VOID load_ot_tables(HDC hdc, ScriptCache *psc)
> psc->GDEF_Table = load_gdef_table(hdc);
> }
>
> -INT SHAPE_does_GSUB_feature_apply_to_chars(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache* psc, const WCHAR *chars, INT write_dir, INT count, const char* feature)
> +int SHAPE_does_GSUB_feature_apply_to_chars(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCache *psc,
> + const WCHAR *chars, int write_dir, int count, const char *feature)
> {
> WORD *glyphs;
> INT glyph_count = count;
> INT rc;
>
> - glyphs = heap_alloc(2 * count * sizeof(*glyphs));
> + glyphs = heap_calloc(count, 2 * sizeof(*glyphs));
> GetGlyphIndicesW(hdc, chars, count, glyphs, 0);
> rc = apply_GSUB_feature_to_glyph(hdc, psa, psc, glyphs, 0, write_dir, &glyph_count, feature);
> if (rc > GSUB_E_NOGLYPH)
>
More information about the wine-devel
mailing list