git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7b48bf9
)
vf_format: check input validity
author
Vittorio Giovara
<vittorio.giovara@gmail.com>
Sat, 18 Oct 2014 15:10:35 +0000
(16:10 +0100)
committer
Vittorio Giovara
<vittorio.giovara@gmail.com>
Mon, 20 Oct 2014 09:38:38 +0000
(10:38 +0100)
CC: libav-stable@libav.org
libavfilter/vf_format.c
patch
|
blob
|
history
diff --git
a/libavfilter/vf_format.c
b/libavfilter/vf_format.c
index
d37f870
..
914089d
100644
(file)
--- 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;
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, '|'))) {
/* count the formats */
cur = s->pix_fmts;
while ((cur = strchr(cur, '|'))) {