1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

ac3_parser: add required padding for GetBitContext buffer

Fixes stack buffer overflow errors detected by address sanitizer in
various fate tests.

CC: libav-stable@libav.org
This commit is contained in:
Janne Grunau
2015-06-08 14:48:26 +02:00
parent fb14730802
commit 09447f2b0f

View File

@@ -150,7 +150,7 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info,
int err; int err;
union { union {
uint64_t u64; uint64_t u64;
uint8_t u8[8]; uint8_t u8[8 + FF_INPUT_BUFFER_PADDING_SIZE];
} tmp = { av_be2ne64(state) }; } tmp = { av_be2ne64(state) };
AC3HeaderInfo hdr; AC3HeaderInfo hdr;
GetBitContext gbc; GetBitContext gbc;