Module: wine Branch: master Commit: 2e0ce5b8e70bbfcf50cc415df2ed3f2ee6bac536 URL: https://source.winehq.org/git/wine.git/?a=commit;h=2e0ce5b8e70bbfcf50cc415df...
Author: Nikolay Sivov nsivov@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@codeweavers.com Signed-off-by: Alexandre Julliard julliard@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));