summaryrefslogtreecommitdiff
path: root/libavcodec/aacdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-28 13:45:29 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-28 13:54:56 +0200
commit514940773196b7c242875fb3c4e6fc18a89d1dbd (patch)
tree651e0fa01fe5bef927d96ab749f17530b98c10ef /libavcodec/aacdec.c
parent65af5e815a7aa9a9443bb0a48875f366ae812b5c (diff)
parenta943a132f36f4df8fe2f749744677b71984abce7 (diff)
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/aacdec.c')
-rw-r--r--libavcodec/aacdec.c2
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))))