Module: wine Branch: master Commit: 967f3a5074852f590b9d82aadeb3a7028d0f7277 URL: https://gitlab.winehq.org/wine/wine/-/commit/967f3a5074852f590b9d82aadeb3a70...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sun Mar 24 19:15:08 2024 +0100
dwrite/shape: Fully initialize shaping context when getting glyph positions (Valgrind).
Actual issue is uninitialized has_gpos_attachment flag, it might be harmless in practice but it's better to avoid.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
---
dlls/dwrite/analyzer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c index 8f7327278d7..0fab5b7142e 100644 --- a/dlls/dwrite/analyzer.c +++ b/dlls/dwrite/analyzer.c @@ -1592,7 +1592,7 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphPlacements(IDWriteTextAnalyzer2 UINT32 const* feature_range_lengths, UINT32 feature_ranges, float *advances, DWRITE_GLYPH_OFFSET *offsets) { const struct dwritescript_properties *scriptprops; - struct scriptshaping_context context; + struct scriptshaping_context context = { 0 }; struct dwrite_fontface *font_obj; unsigned int i; HRESULT hr; @@ -1666,7 +1666,7 @@ static HRESULT WINAPI dwritetextanalyzer_GetGdiCompatibleGlyphPlacements(IDWrite UINT32 const* feature_range_lengths, UINT32 feature_ranges, float *advances, DWRITE_GLYPH_OFFSET *offsets) { const struct dwritescript_properties *scriptprops; - struct scriptshaping_context context; + struct scriptshaping_context context = { 0 }; DWRITE_MEASURING_MODE measuring_mode; struct dwrite_fontface *font_obj; unsigned int i;