[FFmpeg-devel] [PATCH v2 1/2] avfilter/drawtext: support bitmap (including monochrome) fonts

2025-03-02 Thread Yogeshwar Velingker via ffmpeg-devel
Fix segfaults that occur when using a bitmap font. Do not free glyphs on error in load_glyph - upon detecting a monochrome glyph, the function would free it while leaving its corresponding node in the glyph tree, resulting in invalid reads and double frees. Avoid calling FT_Glyph_To_Bitmap on bitma

[FFmpeg-devel] [PATCH 2/2] avfilter/drawtext: fix memory bugs

2025-03-02 Thread Yogeshwar Velingker via ffmpeg-devel
Check for malloc failures, and fix error paths that leak memory. Signed-off-by: Yogeshwar Velingker --- libavfilter/vf_drawtext.c | 47 +-- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c in

[FFmpeg-devel] [PATCH 1/2] avfilter/drawtext: support bitmap (including monochrome) fonts

2025-03-02 Thread Yogeshwar Velingker via ffmpeg-devel
Fix segfaults that occur when using a bitmap font. Do not free glyphs on error in load_glyph - upon detecting a monochrome glyph, the function would free it while leaving its corresponding node in the glyph tree, resulting in invalid reads and double frees. Avoid calling FT_Glyph_To_Bitmap on bitma