summaryrefslogtreecommitdiff
path: root/libavfilter/vf_format.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-05 20:14:03 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-05 20:14:03 +0100
commitee16e0cacc16ea60c35a66796410012755263c3c (patch)
tree682335ec012de6079e9bbd00ffebf68967309b48 /libavfilter/vf_format.c
parentb53d6ce3fdefb48b4844efc1572b8ae9da0c4ecc (diff)
avfilter/vf_format: check that the format list is not empty
Fixes Ticket3210 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_format.c')
-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 2e9ff27be7..98061e9153 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, '|')))