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

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

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

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

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

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

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

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