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>
pull/349/head
James Almer 7 years ago
parent bed125b710
commit 3258cc6507
  1. 3
      libavcodec/bitstream_filters.c

@ -78,6 +78,9 @@ const AVBitStreamFilter *av_bsf_get_by_name(const char *name)
const AVBitStreamFilter *f = NULL; const AVBitStreamFilter *f = NULL;
void *i = 0; void *i = 0;
if (!name)
return NULL;
while ((f = av_bsf_iterate(&i))) { while ((f = av_bsf_iterate(&i))) {
if (!strcmp(f->name, name)) if (!strcmp(f->name, name))
return f; return f;

Loading…
Cancel
Save