diff options
author | Jai Menon <realityman@gmx.net> | 2009-02-10 13:47:50 +0000 |
---|---|---|
committer | Robert Swain <robert.swain@gmail.com> | 2009-02-10 13:47:50 +0000 |
commit | f418b86151921355e6843a126154d56ce86256ae (patch) | |
tree | 3fa5b0b77d707ac27b3a11ab0c7b9eec99d77f20 /libavcodec | |
parent | c7efffcb443fe5a2134833f62987b3a999e0701e (diff) | |
download | ffmpeg-f418b86151921355e6843a126154d56ce86256ae.tar.gz |
Check sampling index validity for AAC decoding
Patch by Jai Menon ( jmenon86 gmail com )
Originally committed as revision 17131 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/aac.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/aac.c b/libavcodec/aac.c index 87b58bcc4f..7275430a8d 100644 --- a/libavcodec/aac.c +++ b/libavcodec/aac.c @@ -1555,6 +1555,10 @@ static int aac_decode_frame(AVCodecContext * avccontext, void * data, int * data av_log(avccontext, AV_LOG_ERROR, "Error decoding AAC frame header.\n"); return -1; } + if (ac->m4ac.sampling_index > 11) { + av_log(ac->avccontext, AV_LOG_ERROR, "invalid sampling rate index %d\n", ac->m4ac.sampling_index); + return -1; + } } // parse |