libavcodec/ac3enc.c:435: error: Buffer Overrun L2
  Offset: [3, 21] Size: 6 by call to `ff_ac3_bit_alloc_calc_mask`.

libavcodec/ac3enc.c:417:1: Array declaration
415. 
416. 
417. static void bit_alloc_masking(AC3EncodeContext *s,
     ^
418.                               uint8_t encoded_exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2],
419.                               uint8_t exp_strategy[NB_BLOCKS][AC3_MAX_CHANNELS],

libavcodec/ac3enc.c:435:17: Call
433.                                           s->nb_coefs[ch],
434.                                           psd[blk][ch], band_psd[blk][ch]);
435.                 ff_ac3_bit_alloc_calc_mask(&s->bit_alloc, band_psd[blk][ch],
                     ^
436.                                            0, s->nb_coefs[ch],
437.                                            ff_ac3_fast_gain_tab[s->fast_gain_code[ch]],

libavcodec/ac3.c:159:16: <Offset trace>
157.         }
158. 
159.         end1 = FFMIN(band_end, 22);
                    ^
160.         for (band = begin; band < end1; band++) {
161.             if (!(is_lfe && band == 6))

libavcodec/ac3.c:159:16: Assignment
  157.         }
  158. 
  159.         end1 = FFMIN(band_end, 22);
                      ^
  160.         for (band = begin; band < end1; band++) {
  161.             if (!(is_lfe && band == 6))

libavcodec/ac3.c:159:9: Assignment
  157.         }
  158. 
  159.         end1 = FFMIN(band_end, 22);
               ^
  160.         for (band = begin; band < end1; band++) {
  161.             if (!(is_lfe && band == 6))

libavcodec/ac3.c:123:1: <Length trace>
121. }
122. 
123. int ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd,
     ^
124.                                int start, int end, int fast_gain, int is_lfe,
125.                                int dba_mode, int dba_nsegs, uint8_t *dba_offsets,

libavcodec/ac3.c:123:1: Parameter `*band_psd`
  121. }
  122. 
  123. int ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd,
       ^
  124.                                int start, int end, int fast_gain, int is_lfe,
  125.                                int dba_mode, int dba_nsegs, uint8_t *dba_offsets,

libavcodec/ac3.c:163:24: Array access: Offset: [3, 21] Size: 6 by call to `ff_ac3_bit_alloc_calc_mask` 
  161.             if (!(is_lfe && band == 6))
  162.                 lowcomp = calc_lowcomp(lowcomp, band_psd[band], band_psd[band+1], band);
  163.             fastleak = FFMAX(fastleak - s->fast_decay, band_psd[band] - fast_gain);
                              ^
  164.             slowleak = FFMAX(slowleak - s->slow_decay, band_psd[band] - s->slow_gain);
  165.             excite[band] = FFMAX(fastleak - lowcomp, slowleak);
