aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2018-07-28 00:51:57 -0300
committerJames Almer <jamrial@gmail.com>2018-07-28 11:14:19 -0300
commit3258cc6507a2012d54889ce5f8efbde7e81d927d (patch)
tree6dcd48e727b097716e5de375db9f6b7a150d926a
parentbed125b7108481574f36fdd6ee699b27354602e8 (diff)
downloadffmpeg-3258cc6507a2012d54889ce5f8efbde7e81d927d.tar.gz
avcodec/bitstream_filters: check the input argument of av_bsf_get_by_name() for NULL
Fixes crashes like "ffmpeg -h bsf" caused by passing NULL to strcmp() Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/bitstream_filters.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/bitstream_filters.c b/libavcodec/bitstream_filters.c
index c21373621c..3433921554 100644
--- a/libavcodec/bitstream_filters.c
+++ b/libavcodec/bitstream_filters.c
@@ -78,6 +78,9 @@ const AVBitStreamFilter *av_bsf_get_by_name(const char *name)
const AVBitStreamFilter *f = NULL;
void *i = 0;
+ if (!name)
+ return NULL;
+
while ((f = av_bsf_iterate(&i))) {
if (!strcmp(f->name, name))
return f;