[FFmpeg-cvslog] ac3_parser: add required padding for GetBitContext buffer

Janne Grunau git at videolan.org
Tue Jun 9 17:42:14 CEST 2015


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Mon Jun  8 14:48:26 2015 +0200| [09447f2b0fafac6d9565aab82a4c5f16fc99ee5e] | committer: Janne Grunau

ac3_parser: add required padding for GetBitContext buffer

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

CC: libav-stable at libav.org

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=09447f2b0fafac6d9565aab82a4c5f16fc99ee5e
---

 libavcodec/ac3_parser.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c
index 5ea09f8..69d88c1 100644
--- a/libavcodec/ac3_parser.c
+++ b/libavcodec/ac3_parser.c
@@ -150,7 +150,7 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info,
     int err;
     union {
         uint64_t u64;
-        uint8_t  u8[8];
+        uint8_t  u8[8 + FF_INPUT_BUFFER_PADDING_SIZE];
     } tmp = { av_be2ne64(state) };
     AC3HeaderInfo hdr;
     GetBitContext gbc;



More information about the ffmpeg-cvslog mailing list