Skip to content
Snippets Groups Projects
Commit 579795b2 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avfilter/af_channelmap: Check for missing argument in get_channel_idx()


Fixes null pointer dereference

Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 47372caa
No related branches found
No related tags found
No related merge requests found
......@@ -93,6 +93,8 @@ static int get_channel_idx(char **map, int *ch, char delim, int max_ch)
int n = 0;
if (!next && delim == '-')
return AVERROR(EINVAL);
if (!*map)
return AVERROR(EINVAL);
len = strlen(*map);
sscanf(*map, "%d%n", ch, &n);
if (n != len)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment