diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-28 13:45:29 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-28 13:54:56 +0200 |
commit | 514940773196b7c242875fb3c4e6fc18a89d1dbd (patch) | |
tree | 651e0fa01fe5bef927d96ab749f17530b98c10ef /libavcodec | |
parent | 65af5e815a7aa9a9443bb0a48875f366ae812b5c (diff) | |
parent | a943a132f36f4df8fe2f749744677b71984abce7 (diff) | |
download | ffmpeg-514940773196b7c242875fb3c4e6fc18a89d1dbd.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
aac: check the maximum number of channels
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/aacdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index 37c7de5e90..f60060adb5 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -148,6 +148,8 @@ static av_cold int che_configure(AACContext *ac, enum ChannelPosition che_pos, int type, int id, int *channels) { + if (*channels >= MAX_CHANNELS) + return AVERROR_INVALIDDATA; if (che_pos) { if (!ac->che[type][id]) { if (!(ac->che[type][id] = av_mallocz(sizeof(ChannelElement)))) |