diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-10-18 16:10:35 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-10-20 10:38:38 +0100 |
commit | d1afd3e1d6e43f4d37ae147091f270124ac48e04 (patch) | |
tree | 3358c45c16043a67b5b7bac705c4b43b68758b0e /libavfilter | |
parent | 7b48bf95242ebf95366d24d32e4cfca6aa77c5e2 (diff) | |
download | ffmpeg-d1afd3e1d6e43f4d37ae147091f270124ac48e04.tar.gz |
vf_format: check input validity
CC: libav-stable@libav.org
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_format.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c index d37f870537..914089deab 100644 --- a/libavfilter/vf_format.c +++ b/libavfilter/vf_format.c @@ -59,6 +59,11 @@ static av_cold int init(AVFilterContext *ctx) int nb_formats = 1; int i; + if (!s->pix_fmts) { + av_log(ctx, AV_LOG_ERROR, "Empty output format string.\n"); + return AVERROR(EINVAL); + } + /* count the formats */ cur = s->pix_fmts; while ((cur = strchr(cur, '|'))) { |