diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-04-24 12:30:20 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-04-27 04:40:12 +0200 |
commit | c6e3682a0c19101e553552c19822add392242195 (patch) | |
tree | 200685a797ff7d859c9335a522bf31f2fe9fe012 | |
parent | e80a4ce69f0eca53f7ef2b003bfa468faf6632af (diff) | |
download | ffmpeg-c6e3682a0c19101e553552c19822add392242195.tar.gz |
avfilter/vf_drawtext: Check return code of load_glyph()
Fixes segfault
Fixes Ticket5347
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2e67a99fbc6b99315925de40fc6fa7161576be10)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavfilter/vf_drawtext.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 16e3383db0..a0cb222fa0 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); |