diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-23 15:03:40 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-23 15:03:40 +0100 |
commit | 579795b2049bc8b0f291b302e7ab24f9561eaf24 (patch) | |
tree | 816225801791d875f45287156f89e326e3ca6c18 /libavfilter | |
parent | 47372caac507c4c4fbef57e32233a3a5e1823f68 (diff) | |
download | ffmpeg-579795b2049bc8b0f291b302e7ab24f9561eaf24.tar.gz |
avfilter/af_channelmap: Check for missing argument in get_channel_idx()
Fixes null pointer dereference
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_channelmap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c index c3454c5b69..2a43c12af2 100644 --- a/libavfilter/af_channelmap.c +++ b/libavfilter/af_channelmap.c @@ -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) |