Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-22 03:15:57 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-08-22 03:24:40 +0400
commitfccd85b9f30525f88692f53134eba41f1f2d90db (patch)
treeebe5799ba0c7eee73f794c82e1b6960d11e2ee57 /libavcodec/aac_parser.c
parentb3d6543caf3b67e453b7bb5120ba4b3de105f766 (diff)
avcodec: fix aac/ac3 parser bitstream buffer size
Buffers containing copies of the AAC and AC3 header bits were not padded before parsing, violating init_get_bits() buffer padding requirement, leading to potential buffer read overflows. This change adds FF_INPUT_BUFFER_PADDING_SIZE bytes to the bit buffer for parsing the header in each of aac_parser.c and ac3_parser.c. Based on patch by: Matt Wolenetz <wolenetz@chromium.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aac_parser.c')
-rw-r--r--libavcodec/aac_parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aac_parser.c b/libavcodec/aac_parser.c
index ab6ca4e268..cb93ba9482 100644
--- a/libavcodec/aac_parser.c
+++ b/libavcodec/aac_parser.c
@@ -34,7 +34,7 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info,
int size;
union {
uint64_t u64;
- uint8_t u8[8];
+ uint8_t u8[8 + FF_INPUT_BUFFER_PADDING_SIZE];
} tmp;
tmp.u64 = av_be2ne64(state);