aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-04-24 12:30:20 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-04-29 14:23:41 +0200
commit987082ff913841815a4ff7428c9379cecc63a3c9 (patch)
tree1286b3246e43dbb2980566d53c397495e459ecf6
parent17e7cb98be90a1af33e2a3e0a62d50535845729a (diff)
downloadffmpeg-987082ff913841815a4ff7428c9379cecc63a3c9.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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index d20f8055c4..864ff63e8c 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -1174,7 +1174,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);