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

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

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

libavcodec/ac3.c:120:24: <Offset trace>
118. 
119.         end1=bndend;
120.         if (end1 > 22) end1=22;
                            ^
121. 
122.         for (bin = begin; bin < end1; bin++) {

libavcodec/ac3.c:120:24: Assignment
  118. 
  119.         end1=bndend;
  120.         if (end1 > 22) end1=22;
                              ^
  121. 
  122.         for (bin = begin; bin < end1; bin++) {

libavcodec/ac3.c:83:1: <Length trace>
81. }
82. 
83. void ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd,
    ^
84.                                 int start, int end, int fast_gain, int is_lfe,
85.                                 int dba_mode, int dba_nsegs, uint8_t *dba_offsets,

libavcodec/ac3.c:83:1: Parameter `*band_psd`
  81. }
  82. 
  83. void ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd,
      ^
  84.                                 int start, int end, int fast_gain, int is_lfe,
  85.                                 int dba_mode, int dba_nsegs, uint8_t *dba_offsets,

libavcodec/ac3.c:126:24: Array access: Offset: [3, 21] Size: 6 by call to `ff_ac3_bit_alloc_calc_mask` 
  124.                 lowcomp = calc_lowcomp(lowcomp, band_psd[bin], band_psd[bin+1], bin);
  125. 
  126.             fastleak = FFMAX(fastleak - s->fast_decay, band_psd[bin] - fast_gain);
                              ^
  127.             slowleak = FFMAX(slowleak - s->slow_decay, band_psd[bin] - s->slow_gain);
  128.             excite[bin] = FFMAX(fastleak - lowcomp, slowleak);
