libavcodec/atrac3plus.c:1223: error: Buffer Overrun L3
  Offset: [-1, +oo] Size: 7 by call to `gainc_loc_mode0`.

libavcodec/atrac3plus.c:1222:18: Assignment
1220.     case 0: /* sequence of numbers in ascending order */
1221.         for (sb = 0; sb < coded_subbands; sb++)
1222.             for (i = 0; i < chan->gain_data[sb].num_points; i++)
                       ^
1223.                 gainc_loc_mode0(bc, ctx, &chan->gain_data[sb], i);
1224.         break;

libavcodec/atrac3plus.c:1223:17: Call
1221.         for (sb = 0; sb < coded_subbands; sb++)
1222.             for (i = 0; i < chan->gain_data[sb].num_points; i++)
1223.                 gainc_loc_mode0(bc, ctx, &chan->gain_data[sb], i);
                      ^
1224.         break;
1225.     case 1:

libavcodec/atrac3plus.c:1154:1: <Offset trace>
1152.  * @param[in]     pos    position of the value to be processed
1153.  */
1154. static inline void gainc_loc_mode0(BitstreamContext *bc, Atrac3pChanUnitCtx *ctx,
      ^
1155.                                    AtracGainInfo *dst, int pos)
1156. {

libavcodec/atrac3plus.c:1154:1: Parameter `pos`
  1152.  * @param[in]     pos    position of the value to be processed
  1153.  */
  1154. static inline void gainc_loc_mode0(BitstreamContext *bc, Atrac3pChanUnitCtx *ctx,
        ^
  1155.                                    AtracGainInfo *dst, int pos)
  1156. {

libavcodec/atrac3plus.c:1154:1: <Length trace>
1152.  * @param[in]     pos    position of the value to be processed
1153.  */
1154. static inline void gainc_loc_mode0(BitstreamContext *bc, Atrac3pChanUnitCtx *ctx,
      ^
1155.                                    AtracGainInfo *dst, int pos)
1156. {

libavcodec/atrac3plus.c:1154:1: Parameter `dst->loc_code[*]`
  1152.  * @param[in]     pos    position of the value to be processed
  1153.  */
  1154. static inline void gainc_loc_mode0(BitstreamContext *bc, Atrac3pChanUnitCtx *ctx,
        ^
  1155.                                    AtracGainInfo *dst, int pos)
  1156. {

libavcodec/atrac3plus.c:1159:17: Array access: Offset: [-1, +oo] Size: 7 by call to `gainc_loc_mode0` 
  1157.     int delta_bits;
  1158. 
  1159.     if (!pos || dst->loc_code[pos - 1] < 15)
                        ^
  1160.         dst->loc_code[pos] = bitstream_read(bc, 5);
  1161.     else if (dst->loc_code[pos - 1] >= 30)
