summaryrefslogtreecommitdiff
path: root/libavcodec/aac_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/aac_parser.c')
-rw-r--r--libavcodec/aac_parser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/aac_parser.c b/libavcodec/aac_parser.c
index d6cf2693fc..ac806931ec 100644
--- a/libavcodec/aac_parser.c
+++ b/libavcodec/aac_parser.c
@@ -67,6 +67,9 @@ static int aac_sync(const uint8_t *buf, int *channels, int *sample_rate,
skip_bits1(&bits); /* copyright_identification_bit */
skip_bits1(&bits); /* copyright_identification_start */
size = get_bits(&bits, 13); /* aac_frame_length */
+ if(size < AAC_HEADER_SIZE)
+ return 0;
+
skip_bits(&bits, 11); /* adts_buffer_fullness */
rdb = get_bits(&bits, 2); /* number_of_raw_data_blocks_in_frame */