mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/af_channelmap: Check for missing argument in get_channel_idx()
Fixes null pointer dereference Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
47372caac5
commit
579795b204
|
@ -93,6 +93,8 @@ static int get_channel_idx(char **map, int *ch, char delim, int max_ch)
|
||||||
int n = 0;
|
int n = 0;
|
||||||
if (!next && delim == '-')
|
if (!next && delim == '-')
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
|
if (!*map)
|
||||||
|
return AVERROR(EINVAL);
|
||||||
len = strlen(*map);
|
len = strlen(*map);
|
||||||
sscanf(*map, "%d%n", ch, &n);
|
sscanf(*map, "%d%n", ch, &n);
|
||||||
if (n != len)
|
if (n != len)
|
||||||
|
|
Loading…
Reference in New Issue