Browse Source

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>
(cherry picked from commit 3258cc6507)
release/3.1
James Almer 7 years ago
parent
commit
a9c1ef2626
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/bitstream_filters.c

+ 3
- 0
libavcodec/bitstream_filters.c View File

@@ -58,6 +58,9 @@ const AVBitStreamFilter *av_bsf_get_by_name(const char *name)
{
int i;

if (!name)
return NULL;

for (i = 0; bitstream_filters[i]; i++) {
const AVBitStreamFilter *f = bitstream_filters[i];
if (!strcmp(f->name, name))


Loading…
Cancel
Save