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

libavformat/adtsenc.c:75:1: Array declaration
73. }
74. 
75. static int adts_write_frame_header(AVFormatContext *s, int size)
    ^
76. {
77.     ADTSContext *ctx = s->priv_data;

libavformat/adtsenc.c:81:5: Call
79.     uint8_t buf[ADTS_HEADER_SIZE];
80. 
81.     init_put_bits(&pb, buf, ADTS_HEADER_SIZE);
        ^
82. 
83.     /* adts_fixed_header */

libavcodec/bitstream.h:91:1: Parameter `*buffer`
  89. } PutBitContext;
  90. 
  91. static inline void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
      ^
  92. {
  93.     if(buffer_size < 0) {

libavcodec/bitstream.h:99:5: Assignment
   97. 
   98.     s->size_in_bits= 8*buffer_size;
   99.     s->buf = buffer;
           ^
  100.     s->buf_end = s->buf + buffer_size;
  101. #ifdef ALT_BITSTREAM_WRITER

libavcodec/bitstream.h:106:5: Assignment
  104. //    memset(buffer, 0, buffer_size);
  105. #else
  106.     s->buf_ptr = s->buf;
           ^
  107.     s->bit_left=32;
  108.     s->bit_buf=0;

libavformat/adtsenc.c:84:5: Call
82. 
83.     /* adts_fixed_header */
84.     put_bits(&pb, 12, 0xfff);   /* syncword */
        ^
85.     put_bits(&pb, 1, 0);        /* ID */
86.     put_bits(&pb, 2, 0);        /* layer */

libavcodec/bitstream.h:185:1: Parameter `*s->buf_ptr`
  183. 
  184. #ifndef ALT_BITSTREAM_WRITER
  185. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  186. {
  187.     unsigned int bit_buf;

libavformat/adtsenc.c:85:5: Call
83.     /* adts_fixed_header */
84.     put_bits(&pb, 12, 0xfff);   /* syncword */
85.     put_bits(&pb, 1, 0);        /* ID */
        ^
86.     put_bits(&pb, 2, 0);        /* layer */
87.     put_bits(&pb, 1, 1);        /* protection_absent */

libavcodec/bitstream.h:185:1: Parameter `*s->buf_ptr`
  183. 
  184. #ifndef ALT_BITSTREAM_WRITER
  185. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  186. {
  187.     unsigned int bit_buf;

libavformat/adtsenc.c:86:5: Call
84.     put_bits(&pb, 12, 0xfff);   /* syncword */
85.     put_bits(&pb, 1, 0);        /* ID */
86.     put_bits(&pb, 2, 0);        /* layer */
        ^
87.     put_bits(&pb, 1, 1);        /* protection_absent */
88.     put_bits(&pb, 2, ctx->objecttype); /* profile_objecttype */

libavcodec/bitstream.h:185:1: Parameter `*s->buf_ptr`
  183. 
  184. #ifndef ALT_BITSTREAM_WRITER
  185. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  186. {
  187.     unsigned int bit_buf;

libavformat/adtsenc.c:87:5: Call
85.     put_bits(&pb, 1, 0);        /* ID */
86.     put_bits(&pb, 2, 0);        /* layer */
87.     put_bits(&pb, 1, 1);        /* protection_absent */
        ^
88.     put_bits(&pb, 2, ctx->objecttype); /* profile_objecttype */
89.     put_bits(&pb, 4, ctx->sample_rate_index);

libavcodec/bitstream.h:185:1: Parameter `*s->buf_ptr`
  183. 
  184. #ifndef ALT_BITSTREAM_WRITER
  185. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  186. {
  187.     unsigned int bit_buf;

libavformat/adtsenc.c:88:5: Call
86.     put_bits(&pb, 2, 0);        /* layer */
87.     put_bits(&pb, 1, 1);        /* protection_absent */
88.     put_bits(&pb, 2, ctx->objecttype); /* profile_objecttype */
        ^
89.     put_bits(&pb, 4, ctx->sample_rate_index);
90.     put_bits(&pb, 1, 0);        /* private_bit */

libavcodec/bitstream.h:185:1: Parameter `*s->buf_ptr`
  183. 
  184. #ifndef ALT_BITSTREAM_WRITER
  185. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  186. {
  187.     unsigned int bit_buf;

libavformat/adtsenc.c:89:5: Call
87.     put_bits(&pb, 1, 1);        /* protection_absent */
88.     put_bits(&pb, 2, ctx->objecttype); /* profile_objecttype */
89.     put_bits(&pb, 4, ctx->sample_rate_index);
        ^
90.     put_bits(&pb, 1, 0);        /* private_bit */
91.     put_bits(&pb, 3, ctx->channel_conf); /* channel_configuration */

libavcodec/bitstream.h:185:1: Parameter `*s->buf_ptr`
  183. 
  184. #ifndef ALT_BITSTREAM_WRITER
  185. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  186. {
  187.     unsigned int bit_buf;

libavformat/adtsenc.c:90:5: Call
88.     put_bits(&pb, 2, ctx->objecttype); /* profile_objecttype */
89.     put_bits(&pb, 4, ctx->sample_rate_index);
90.     put_bits(&pb, 1, 0);        /* private_bit */
        ^
91.     put_bits(&pb, 3, ctx->channel_conf); /* channel_configuration */
92.     put_bits(&pb, 1, 0);        /* original_copy */

libavcodec/bitstream.h:185:1: Parameter `*s->buf_ptr`
  183. 
  184. #ifndef ALT_BITSTREAM_WRITER
  185. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  186. {
  187.     unsigned int bit_buf;

libavformat/adtsenc.c:91:5: Call
89.     put_bits(&pb, 4, ctx->sample_rate_index);
90.     put_bits(&pb, 1, 0);        /* private_bit */
91.     put_bits(&pb, 3, ctx->channel_conf); /* channel_configuration */
        ^
92.     put_bits(&pb, 1, 0);        /* original_copy */
93.     put_bits(&pb, 1, 0);        /* home */

libavcodec/bitstream.h:185:1: Parameter `*s->buf_ptr`
  183. 
  184. #ifndef ALT_BITSTREAM_WRITER
  185. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  186. {
  187.     unsigned int bit_buf;

libavformat/adtsenc.c:92:5: Call
90.     put_bits(&pb, 1, 0);        /* private_bit */
91.     put_bits(&pb, 3, ctx->channel_conf); /* channel_configuration */
92.     put_bits(&pb, 1, 0);        /* original_copy */
        ^
93.     put_bits(&pb, 1, 0);        /* home */
94. 

libavcodec/bitstream.h:185:1: Parameter `*s->buf_ptr`
  183. 
  184. #ifndef ALT_BITSTREAM_WRITER
  185. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  186. {
  187.     unsigned int bit_buf;

libavformat/adtsenc.c:93:5: Call
91.     put_bits(&pb, 3, ctx->channel_conf); /* channel_configuration */
92.     put_bits(&pb, 1, 0);        /* original_copy */
93.     put_bits(&pb, 1, 0);        /* home */
        ^
94. 
95.     /* adts_variable_header */

libavcodec/bitstream.h:185:1: Parameter `*s->buf_ptr`
  183. 
  184. #ifndef ALT_BITSTREAM_WRITER
  185. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  186. {
  187.     unsigned int bit_buf;

libavformat/adtsenc.c:96:5: Call
94. 
95.     /* adts_variable_header */
96.     put_bits(&pb, 1, 0);        /* copyright_identification_bit */
        ^
97.     put_bits(&pb, 1, 0);        /* copyright_identification_start */
98.     put_bits(&pb, 13, ADTS_HEADER_SIZE + size); /* aac_frame_length */

libavcodec/bitstream.h:185:1: Parameter `*s->buf_ptr`
  183. 
  184. #ifndef ALT_BITSTREAM_WRITER
  185. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  186. {
  187.     unsigned int bit_buf;

libavformat/adtsenc.c:97:5: Call
95.     /* adts_variable_header */
96.     put_bits(&pb, 1, 0);        /* copyright_identification_bit */
97.     put_bits(&pb, 1, 0);        /* copyright_identification_start */
        ^
98.     put_bits(&pb, 13, ADTS_HEADER_SIZE + size); /* aac_frame_length */
99.     put_bits(&pb, 11, 0x7ff);   /* adts_buffer_fullness */

libavcodec/bitstream.h:185:1: Parameter `*s->buf_ptr`
  183. 
  184. #ifndef ALT_BITSTREAM_WRITER
  185. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  186. {
  187.     unsigned int bit_buf;

libavformat/adtsenc.c:98:5: Call
 96.     put_bits(&pb, 1, 0);        /* copyright_identification_bit */
 97.     put_bits(&pb, 1, 0);        /* copyright_identification_start */
 98.     put_bits(&pb, 13, ADTS_HEADER_SIZE + size); /* aac_frame_length */
         ^
 99.     put_bits(&pb, 11, 0x7ff);   /* adts_buffer_fullness */
100.     put_bits(&pb, 2, 0);        /* number_of_raw_data_blocks_in_frame */

libavcodec/bitstream.h:185:1: Parameter `*s->buf_ptr`
  183. 
  184. #ifndef ALT_BITSTREAM_WRITER
  185. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  186. {
  187.     unsigned int bit_buf;

libavformat/adtsenc.c:99:5: Call
 97.     put_bits(&pb, 1, 0);        /* copyright_identification_start */
 98.     put_bits(&pb, 13, ADTS_HEADER_SIZE + size); /* aac_frame_length */
 99.     put_bits(&pb, 11, 0x7ff);   /* adts_buffer_fullness */
         ^
100.     put_bits(&pb, 2, 0);        /* number_of_raw_data_blocks_in_frame */
101. 

libavcodec/bitstream.h:185:1: Parameter `*s->buf_ptr`
  183. 
  184. #ifndef ALT_BITSTREAM_WRITER
  185. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  186. {
  187.     unsigned int bit_buf;

libavformat/adtsenc.c:100:5: Call
 98.     put_bits(&pb, 13, ADTS_HEADER_SIZE + size); /* aac_frame_length */
 99.     put_bits(&pb, 11, 0x7ff);   /* adts_buffer_fullness */
100.     put_bits(&pb, 2, 0);        /* number_of_raw_data_blocks_in_frame */
         ^
101. 
102.     flush_put_bits(&pb);

libavcodec/bitstream.h:185:1: <Length trace>
183. 
184. #ifndef ALT_BITSTREAM_WRITER
185. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
     ^
186. {
187.     unsigned int bit_buf;

libavcodec/bitstream.h:185:1: Parameter `*s->buf_ptr`
  183. 
  184. #ifndef ALT_BITSTREAM_WRITER
  185. static inline void put_bits(PutBitContext *s, int n, unsigned int value)
       ^
  186. {
  187.     unsigned int bit_buf;

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