Mercurial > libavcodec.hg
changeset 8789:b2a991a936e1 libavcodec
Check sampling index validity for AAC decoding
Patch by Jai Menon ( jmenon86 gmail com )
author | superdump |
---|---|
date | Tue, 10 Feb 2009 13:47:50 +0000 |
parents | 5e9e735cd793 |
children | 1045a26cb90d |
files | aac.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/aac.c Tue Feb 10 12:38:56 2009 +0000 +++ b/aac.c Tue Feb 10 13:47:50 2009 +0000 @@ -1555,6 +1555,10 @@ 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