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

Janne Grunau git at videolan.org
Tue Jun 9 17:35:02 CEST 2015


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Mon Jun  8 14:45:12 2015 +0200| [fb1473080223a634b8ac2cca48a632d037a0a69d] | committer: Janne Grunau

aac_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=fb1473080223a634b8ac2cca48a632d037a0a69d
---

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

diff --git a/libavcodec/aac_parser.c b/libavcodec/aac_parser.c
index fdaa5f8..acb05d4 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);



More information about the ffmpeg-cvslog mailing list