mirror of https://git.ffmpeg.org/ffmpeg.git
Merge remote-tracking branch 'qatar/master'
* qatar/master: aac: check the maximum number of channels Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
5149407731
|
@ -148,6 +148,8 @@ static av_cold int che_configure(AACContext *ac,
|
||||||
enum ChannelPosition che_pos,
|
enum ChannelPosition che_pos,
|
||||||
int type, int id, int *channels)
|
int type, int id, int *channels)
|
||||||
{
|
{
|
||||||
|
if (*channels >= MAX_CHANNELS)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
if (che_pos) {
|
if (che_pos) {
|
||||||
if (!ac->che[type][id]) {
|
if (!ac->che[type][id]) {
|
||||||
if (!(ac->che[type][id] = av_mallocz(sizeof(ChannelElement))))
|
if (!(ac->che[type][id] = av_mallocz(sizeof(ChannelElement))))
|
||||||
|
|
Loading…
Reference in New Issue