mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avfilter/af_channelmap: disallow channel index 64
MAX_CH is 64, therefore the maximum index is 63.
Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 2f754a96bd
)
This commit is contained in:
parent
0deb010ae7
commit
8d1e092b24
@ -85,7 +85,7 @@ static char* split(char *message, char delim) {
|
||||
return next;
|
||||
}
|
||||
|
||||
static int get_channel_idx(char **map, int *ch, char delim, int max_ch)
|
||||
static int get_channel_idx(char **map, int *ch, char delim, int max_nb_channels)
|
||||
{
|
||||
char *next;
|
||||
int len;
|
||||
@ -99,7 +99,7 @@ static int get_channel_idx(char **map, int *ch, char delim, int max_ch)
|
||||
sscanf(*map, "%d%n", ch, &n);
|
||||
if (n != len)
|
||||
return AVERROR(EINVAL);
|
||||
if (*ch < 0 || *ch > max_ch)
|
||||
if (*ch < 0 || *ch >= max_nb_channels)
|
||||
return AVERROR(EINVAL);
|
||||
*map = next;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user