aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-05 20:14:03 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2014-01-07 02:02:52 +0100
commitedc6f3da0ed58ae3202fea9ba927fd6d4a22c997 (patch)
treeda570991a1414f8630ce6419ee2feaaaf894dc77
parent8763aca389f072c8c45ff47cda610764e4aea0f1 (diff)
downloadffmpeg-edc6f3da0ed58ae3202fea9ba927fd6d4a22c997.tar.gz
avfilter/vf_format: check that the format list is not empty
Fixes Ticket3210 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit ee16e0cacc16ea60c35a66796410012755263c3c)
-rw-r--r--libavfilter/vf_format.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c
index 1813a2c5e9..a9e386f373 100644
--- a/libavfilter/vf_format.c
+++ b/libavfilter/vf_format.c
@@ -55,6 +55,9 @@ static av_cold int init(AVFilterContext *ctx)
int pix_fmt_name_len, ret;
enum AVPixelFormat pix_fmt;
+ if (!s->pix_fmts)
+ return AVERROR(EINVAL);
+
/* parse the list of formats */
for (cur = s->pix_fmts; cur; cur = sep ? sep + 1 : NULL) {
if (!(sep = strchr(cur, '|')))