[libav-devel] [PATCH 1/3] aac_parser: add required padding for GetBitContext buffer

2015-06-08 Thread Janne Grunau
Fixes stack buffer overflow errors detected by address sanitizer in
various fate tests.
---
 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);
-- 
2.4.2

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/3] aac_parser: add required padding for GetBitContext buffer

2015-06-08 Thread Luca Barbato
On 08/06/15 15:09, Janne Grunau wrote:
 Fixes stack buffer overflow errors detected by address sanitizer in
 various fate tests.
 ---
  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);
 

Set Ok. Thanks for fixing it =)
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel