summaryrefslogtreecommitdiff
path: root/libavcodec/aac.c
diff options
context:
space:
mode:
authorJai Menon <realityman@gmx.net>2009-02-10 13:47:50 +0000
committerRobert Swain <robert.swain@gmail.com>2009-02-10 13:47:50 +0000
commitf418b86151921355e6843a126154d56ce86256ae (patch)
tree3fa5b0b77d707ac27b3a11ab0c7b9eec99d77f20 /libavcodec/aac.c
parentc7efffcb443fe5a2134833f62987b3a999e0701e (diff)
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/aac.c')
-rw-r--r--libavcodec/aac.c4
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