[PATCH 3/4] dwrite/layout: Grow output buffer on GetGlyphs() failure.

Nikolay Sivov nsivov at codeweavers.com
Tue Feb 16 03:48:40 CST 2021


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 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));
-- 
2.30.0




More information about the wine-devel mailing list