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 3258cc6507a2012d54889ce5f8efbde7e81d927d)
This commit is contained in:
parent
18c9d5d3e8
commit
660e4c0c96
@ -59,6 +59,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…
x
Reference in New Issue
Block a user