libavformat/adtsenc.c:113: error: Buffer Overrun L2
  Offset: [3, 59] (⇐ [0, 56] + 3) Size: 7 by call to `put_bits`.

libavformat/adtsenc.c:88:1: Array declaration
86. }
87. 
88. static int adts_write_frame_header(AVFormatContext *s, int size)
    ^
89. {
90.     ADTSContext *ctx = s->priv_data;

libavformat/adtsenc.c:94:5: Call
92.     uint8_t buf[ADTS_HEADER_SIZE];
93. 
94.     init_put_bits(&pb, buf, ADTS_HEADER_SIZE);
        ^
95. 
96.     /* adts_fixed_header */

libavcodec/put_bits.h:60:1: Parameter `*buffer`
  58.  * @param buffer_size the size in bytes of \p buffer
  59.  */
  60. static inline void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
      ^
  61. {
  62.     if(buffer_size < 0) {

libavcodec/put_bits.h:68:5: Assignment
  66. 
  67.     s->size_in_bits= 8*buffer_size;
  68.     s->buf = buffer;
          ^
  69.     s->buf_end = s->buf + buffer_size;
  70. #ifdef ALT_BITSTREAM_WRITER

libavcodec/put_bits.h:75:5: Assignment
  73. //    memset(buffer, 0, buffer_size);
  74. #else
  75.     s->buf_ptr = s->buf;
          ^
  76.     s->bit_left=32;
  77.     s->bit_buf=0;

libavformat/adtsenc.c:97:5: Call
95. 
96.     /* adts_fixed_header */
97.     put_bits(&pb, 12, 0xfff);   /* syncword */
        ^
98.     put_bits(&pb, 1, 0);        /* ID */
99.     put_bits(&pb, 2, 0);        /* layer */

libavcodec/put_bits.h:139:1: Parameter `*s->buf_ptr`
  137. void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
  138. 
  139. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  140. #ifndef ALT_BITSTREAM_WRITER
  141. {

libavformat/adtsenc.c:98:5: Call
 96.     /* adts_fixed_header */
 97.     put_bits(&pb, 12, 0xfff);   /* syncword */
 98.     put_bits(&pb, 1, 0);        /* ID */
         ^
 99.     put_bits(&pb, 2, 0);        /* layer */
100.     put_bits(&pb, 1, 1);        /* protection_absent */

libavcodec/put_bits.h:139:1: Parameter `*s->buf_ptr`
  137. void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
  138. 
  139. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  140. #ifndef ALT_BITSTREAM_WRITER
  141. {

libavformat/adtsenc.c:99:5: Call
 97.     put_bits(&pb, 12, 0xfff);   /* syncword */
 98.     put_bits(&pb, 1, 0);        /* ID */
 99.     put_bits(&pb, 2, 0);        /* layer */
         ^
100.     put_bits(&pb, 1, 1);        /* protection_absent */
101.     put_bits(&pb, 2, ctx->objecttype); /* profile_objecttype */

libavcodec/put_bits.h:139:1: Parameter `*s->buf_ptr`
  137. void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
  138. 
  139. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  140. #ifndef ALT_BITSTREAM_WRITER
  141. {

libavformat/adtsenc.c:100:5: Call
 98.     put_bits(&pb, 1, 0);        /* ID */
 99.     put_bits(&pb, 2, 0);        /* layer */
100.     put_bits(&pb, 1, 1);        /* protection_absent */
         ^
101.     put_bits(&pb, 2, ctx->objecttype); /* profile_objecttype */
102.     put_bits(&pb, 4, ctx->sample_rate_index);

libavcodec/put_bits.h:139:1: Parameter `*s->buf_ptr`
  137. void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
  138. 
  139. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  140. #ifndef ALT_BITSTREAM_WRITER
  141. {

libavformat/adtsenc.c:101:5: Call
 99.     put_bits(&pb, 2, 0);        /* layer */
100.     put_bits(&pb, 1, 1);        /* protection_absent */
101.     put_bits(&pb, 2, ctx->objecttype); /* profile_objecttype */
         ^
102.     put_bits(&pb, 4, ctx->sample_rate_index);
103.     put_bits(&pb, 1, 0);        /* private_bit */

libavcodec/put_bits.h:139:1: Parameter `*s->buf_ptr`
  137. void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
  138. 
  139. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  140. #ifndef ALT_BITSTREAM_WRITER
  141. {

libavformat/adtsenc.c:102:5: Call
100.     put_bits(&pb, 1, 1);        /* protection_absent */
101.     put_bits(&pb, 2, ctx->objecttype); /* profile_objecttype */
102.     put_bits(&pb, 4, ctx->sample_rate_index);
         ^
103.     put_bits(&pb, 1, 0);        /* private_bit */
104.     put_bits(&pb, 3, ctx->channel_conf); /* channel_configuration */

libavcodec/put_bits.h:139:1: Parameter `*s->buf_ptr`
  137. void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
  138. 
  139. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  140. #ifndef ALT_BITSTREAM_WRITER
  141. {

libavformat/adtsenc.c:103:5: Call
101.     put_bits(&pb, 2, ctx->objecttype); /* profile_objecttype */
102.     put_bits(&pb, 4, ctx->sample_rate_index);
103.     put_bits(&pb, 1, 0);        /* private_bit */
         ^
104.     put_bits(&pb, 3, ctx->channel_conf); /* channel_configuration */
105.     put_bits(&pb, 1, 0);        /* original_copy */

libavcodec/put_bits.h:139:1: Parameter `*s->buf_ptr`
  137. void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
  138. 
  139. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  140. #ifndef ALT_BITSTREAM_WRITER
  141. {

libavformat/adtsenc.c:104:5: Call
102.     put_bits(&pb, 4, ctx->sample_rate_index);
103.     put_bits(&pb, 1, 0);        /* private_bit */
104.     put_bits(&pb, 3, ctx->channel_conf); /* channel_configuration */
         ^
105.     put_bits(&pb, 1, 0);        /* original_copy */
106.     put_bits(&pb, 1, 0);        /* home */

libavcodec/put_bits.h:139:1: Parameter `*s->buf_ptr`
  137. void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
  138. 
  139. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  140. #ifndef ALT_BITSTREAM_WRITER
  141. {

libavformat/adtsenc.c:105:5: Call
103.     put_bits(&pb, 1, 0);        /* private_bit */
104.     put_bits(&pb, 3, ctx->channel_conf); /* channel_configuration */
105.     put_bits(&pb, 1, 0);        /* original_copy */
         ^
106.     put_bits(&pb, 1, 0);        /* home */
107. 

libavcodec/put_bits.h:139:1: Parameter `*s->buf_ptr`
  137. void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
  138. 
  139. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  140. #ifndef ALT_BITSTREAM_WRITER
  141. {

libavformat/adtsenc.c:106:5: Call
104.     put_bits(&pb, 3, ctx->channel_conf); /* channel_configuration */
105.     put_bits(&pb, 1, 0);        /* original_copy */
106.     put_bits(&pb, 1, 0);        /* home */
         ^
107. 
108.     /* adts_variable_header */

libavcodec/put_bits.h:139:1: Parameter `*s->buf_ptr`
  137. void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
  138. 
  139. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  140. #ifndef ALT_BITSTREAM_WRITER
  141. {

libavformat/adtsenc.c:109:5: Call
107. 
108.     /* adts_variable_header */
109.     put_bits(&pb, 1, 0);        /* copyright_identification_bit */
         ^
110.     put_bits(&pb, 1, 0);        /* copyright_identification_start */
111.     put_bits(&pb, 13, ADTS_HEADER_SIZE + size); /* aac_frame_length */

libavcodec/put_bits.h:139:1: Parameter `*s->buf_ptr`
  137. void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
  138. 
  139. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  140. #ifndef ALT_BITSTREAM_WRITER
  141. {

libavformat/adtsenc.c:110:5: Call
108.     /* adts_variable_header */
109.     put_bits(&pb, 1, 0);        /* copyright_identification_bit */
110.     put_bits(&pb, 1, 0);        /* copyright_identification_start */
         ^
111.     put_bits(&pb, 13, ADTS_HEADER_SIZE + size); /* aac_frame_length */
112.     put_bits(&pb, 11, 0x7ff);   /* adts_buffer_fullness */

libavcodec/put_bits.h:139:1: Parameter `*s->buf_ptr`
  137. void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
  138. 
  139. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  140. #ifndef ALT_BITSTREAM_WRITER
  141. {

libavformat/adtsenc.c:111:5: Call
109.     put_bits(&pb, 1, 0);        /* copyright_identification_bit */
110.     put_bits(&pb, 1, 0);        /* copyright_identification_start */
111.     put_bits(&pb, 13, ADTS_HEADER_SIZE + size); /* aac_frame_length */
         ^
112.     put_bits(&pb, 11, 0x7ff);   /* adts_buffer_fullness */
113.     put_bits(&pb, 2, 0);        /* number_of_raw_data_blocks_in_frame */

libavcodec/put_bits.h:139:1: Parameter `*s->buf_ptr`
  137. void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
  138. 
  139. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  140. #ifndef ALT_BITSTREAM_WRITER
  141. {

libavformat/adtsenc.c:112:5: Call
110.     put_bits(&pb, 1, 0);        /* copyright_identification_start */
111.     put_bits(&pb, 13, ADTS_HEADER_SIZE + size); /* aac_frame_length */
112.     put_bits(&pb, 11, 0x7ff);   /* adts_buffer_fullness */
         ^
113.     put_bits(&pb, 2, 0);        /* number_of_raw_data_blocks_in_frame */
114. 

libavcodec/put_bits.h:139:1: Parameter `*s->buf_ptr`
  137. void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
  138. 
  139. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  140. #ifndef ALT_BITSTREAM_WRITER
  141. {

libavformat/adtsenc.c:113:5: Call
111.     put_bits(&pb, 13, ADTS_HEADER_SIZE + size); /* aac_frame_length */
112.     put_bits(&pb, 11, 0x7ff);   /* adts_buffer_fullness */
113.     put_bits(&pb, 2, 0);        /* number_of_raw_data_blocks_in_frame */
         ^
114. 
115.     flush_put_bits(&pb);

libavcodec/put_bits.h:139:1: <Length trace>
137. void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
138. 
139. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
     ^
140. #ifndef ALT_BITSTREAM_WRITER
141. {

libavcodec/put_bits.h:139:1: Parameter `*s->buf_ptr`
  137. void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
  138. 
  139. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  140. #ifndef ALT_BITSTREAM_WRITER
  141. {

libavcodec/put_bits.h:176:13: Array access: Offset: [3, 59] (⇐ [0, 56] + 3) Size: 7 by call to `put_bits` 
  174. #if !HAVE_FAST_UNALIGNED
  175.         if (3 & (intptr_t) s->buf_ptr) {
  176.             AV_WB32(s->buf_ptr, bit_buf);
                   ^
  177.         } else
  178. #endif
