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
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
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