Browse Source

aac: check the maximum number of channels

Broken bitstreams could report a larger than specified number of
channels and cause outbound writes.

CC:libav-stable@libav.org
tags/n2.0
Luca Barbato 12 years ago
parent
commit
a943a132f3
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/aacdec.c

+ 2
- 0
libavcodec/aacdec.c View File

@@ -141,6 +141,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))))


Loading…
Cancel
Save