git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47372ca
)
avfilter/af_channelmap: Check for missing argument in get_channel_idx()
author
Michael Niedermayer
<michaelni@gmx.at>
Fri, 23 Jan 2015 14:03:40 +0000
(15:03 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Fri, 23 Jan 2015 14:03:40 +0000
(15:03 +0100)
Fixes null pointer dereference
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/af_channelmap.c
patch
|
blob
|
history
diff --git
a/libavfilter/af_channelmap.c
b/libavfilter/af_channelmap.c
index
c3454c5
..
2a43c12
100644
(file)
--- 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)