Henri Verbeet : usp10: Use heap_calloc() in SHAPE_does_GSUB_feature_apply_to_chars().
Alexandre Julliard
julliard at winehq.org
Tue Mar 13 17:10:52 CDT 2018
Module: wine
Branch: master
Commit: f09c498e46a1a6a24593d0b8c8d9eb7c302c25be
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f09c498e46a1a6a24593d0b8c8d9eb7c302c25be
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Mar 13 14:11:05 2018 +0330
usp10: Use heap_calloc() in SHAPE_does_GSUB_feature_apply_to_chars().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 ca084e7..4031386 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-cvs
mailing list