[FFmpeg-cvslog] avfilter/vf_drawtext: Check return code of load_glyph()
Michael Niedermayer
git at videolan.org
Wed Apr 27 05:42:59 CEST 2016
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Sun Apr 24 12:30:20 2016 +0200| [c6e3682a0c19101e553552c19822add392242195] | committer: Michael Niedermayer
avfilter/vf_drawtext: Check return code of load_glyph()
Fixes segfault
Fixes Ticket5347
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 2e67a99fbc6b99315925de40fc6fa7161576be10)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c6e3682a0c19101e553552c19822add392242195
---
libavfilter/vf_drawtext.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 16e3383..a0cb222 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -1210,7 +1210,9 @@ static int draw_text(AVFilterContext *ctx, AVFrame *frame,
dummy.code = code;
glyph = av_tree_find(s->glyphs, &dummy, glyph_cmp, NULL);
if (!glyph) {
- load_glyph(ctx, &glyph, code);
+ ret = load_glyph(ctx, &glyph, code);
+ if (ret < 0)
+ return ret;
}
y_min = FFMIN(glyph->bbox.yMin, y_min);
More information about the ffmpeg-cvslog
mailing list