Nikolay Sivov : dwrite/layout: Grow output buffer on GetGlyphs() failure.

Alexandre Julliard julliard at winehq.org
Tue Feb 16 16:03:19 CST 2021


Module: wine
Branch: master
Commit: 2e0ce5b8e70bbfcf50cc415df2ed3f2ee6bac536
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2e0ce5b8e70bbfcf50cc415df2ed3f2ee6bac536

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Feb 16 12:48:40 2021 +0300

dwrite/layout: Grow output buffer on GetGlyphs() failure.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dwrite/layout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index 73fe28e222a..12a2ce1726c 100644
--- a/dlls/dwrite/layout.c
+++ b/dlls/dwrite/layout.c
@@ -979,7 +979,7 @@ static HRESULT layout_shape_get_glyphs(struct dwrite_textlayout *layout, struct
             heap_free(run->glyphs);
             heap_free(context->glyph_props);
 
-            max_count = run->glyphcount;
+            max_count *= 2;
 
             run->glyphs = heap_calloc(max_count, sizeof(*run->glyphs));
             context->glyph_props = heap_calloc(max_count, sizeof(*context->glyph_props));




More information about the wine-cvs mailing list