mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
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
)
This commit is contained in:
parent
8df2c7dde6
commit
bc2301429e
@ -62,6 +62,9 @@ const AVBitStreamFilter *av_bsf_get_by_name(const char *name)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (!name)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
for (i = 0; bitstream_filters[i]; i++) {
|
for (i = 0; bitstream_filters[i]; i++) {
|
||||||
const AVBitStreamFilter *f = bitstream_filters[i];
|
const AVBitStreamFilter *f = bitstream_filters[i];
|
||||||
if (!strcmp(f->name, name))
|
if (!strcmp(f->name, name))
|
||||||
|
Loading…
Reference in New Issue
Block a user