[FFmpeg-cvslog] avfilter/vf_format: check that the format list is not empty
Michael Niedermayer
git at videolan.org
Tue Jan 7 02:03:05 CET 2014
ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 5 20:14:03 2014 +0100| [edc6f3da0ed58ae3202fea9ba927fd6d4a22c997] | committer: Carl Eugen Hoyos
avfilter/vf_format: check that the format list is not empty
Fixes Ticket3210
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit ee16e0cacc16ea60c35a66796410012755263c3c)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=edc6f3da0ed58ae3202fea9ba927fd6d4a22c997
---
libavfilter/vf_format.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c
index 1813a2c..a9e386f 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, '|')))
More information about the ffmpeg-cvslog
mailing list