diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-10-18 16:10:35 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-01-13 00:01:08 +0100 |
commit | d1ad85fc020653be5ad25ed1d3d5091e89fee782 (patch) | |
tree | cae421d7740392227822818c978c69b57d59496d | |
parent | 6cf27b550d66963b89b5917568b85c4b49fb18ba (diff) | |
download | ffmpeg-d1ad85fc020653be5ad25ed1d3d5091e89fee782.tar.gz |
vf_format: check input validity
CC: libav-stable@libav.org
-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, '|'))) { |