[FFmpeg-cvslog] vf_format: check input validity

Vittorio Giovara git at videolan.org
Mon Oct 20 22:07:52 CEST 2014


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Sat Oct 18 16:10:35 2014 +0100| [d1afd3e1d6e43f4d37ae147091f270124ac48e04] | committer: Vittorio Giovara

vf_format: check input validity

CC: libav-stable at libav.org

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d1afd3e1d6e43f4d37ae147091f270124ac48e04
---

 libavfilter/vf_format.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c
index d37f870..914089d 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, '|'))) {



More information about the ffmpeg-cvslog mailing list