summaryrefslogtreecommitdiffstats
path: root/libavfilter/af_channelmap.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-23 15:03:40 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-23 15:03:40 +0100
commit579795b2049bc8b0f291b302e7ab24f9561eaf24 (patch)
tree816225801791d875f45287156f89e326e3ca6c18 /libavfilter/af_channelmap.c
parent47372caac507c4c4fbef57e32233a3a5e1823f68 (diff)
downloadffmpeg-streaming-579795b2049bc8b0f291b302e7ab24f9561eaf24.zip
ffmpeg-streaming-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/af_channelmap.c')
-rw-r--r--libavfilter/af_channelmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
index c3454c5..2a43c12 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)
OpenPOWER on IntegriCloud