libavcodec/atrac3.c:611: error: Buffer Overrun L1
  Offset: 2 (⇐ 1 + 1) Size: 2 by call to `get_channel_weights`.

libavcodec/atrac3.c:603:1: Array declaration
601. }
602. 
603. static void channel_weighting(float *su1, float *su2, int *p3)
     ^
604. {
605.     int band, nsample;

libavcodec/atrac3.c:611:9: Call
609.     if (p3[1] != 7 || p3[3] != 7) {
610.         get_channel_weights(p3[1], p3[0], w[0]);
611.         get_channel_weights(p3[3], p3[2], w[1]);
             ^
612. 
613.         for (band = 256; band < 4 * 256; band += 256) {

libavcodec/atrac3.c:590:1: <Length trace>
588. }
589. 
590. static void get_channel_weights(int index, int flag, float ch[2])
     ^
591. {
592.     if (index == 7) {

libavcodec/atrac3.c:590:1: Parameter `*ch`
  588. }
  589. 
  590. static void get_channel_weights(int index, int flag, float ch[2])
       ^
  591. {
  592.     if (index == 7) {

libavcodec/atrac3.c:594:9: Array access: Offset: 2 (⇐ 1 + 1) Size: 2 by call to `get_channel_weights` 
  592.     if (index == 7) {
  593.         ch[0] = 1.0;
  594.         ch[1] = 1.0;
               ^
  595.     } else {
  596.         ch[0] = (index & 7) / 7.0;

static void get_channel_weights(int index, int flag, float ch[2])
{
    if (index == 7) {
        ch[0] = 1.0;
        ch[1] = 1.0;
    } else {
        ch[0] = (index & 7) / 7.0;
        ch[1] = sqrt(2 - ch[0] * ch[0]);
        if (flag)
            FFSWAP(float, ch[0], ch[1]);
    }
}
['static void channel_weighting(float *su1, float *su2, int *p3)\n{\n    int band, nsample;\n    float w[2][2];\n    if (p3[1] != 7 || p3[3] != 7) {\n        get_channel_weights(p3[1], p3[0], w[0]);\n        get_channel_weights(p3[3], p3[2], w[1]);\n        for (band = 256; band < 4 * 256; band += 256) {\n            for (nsample = band; nsample < band + 8; nsample++) {\n                su1[nsample] *= INTERPOLATE(w[0][0], w[0][1], nsample - band);\n                su2[nsample] *= INTERPOLATE(w[1][0], w[1][1], nsample - band);\n            }\n            for(; nsample < band + 256; nsample++) {\n                su1[nsample] *= w[1][0];\n                su2[nsample] *= w[1][1];\n            }\n        }\n    }\n}', 'static void get_channel_weights(int index, int flag, float ch[2])\n{\n    if (index == 7) {\n        ch[0] = 1.0;\n        ch[1] = 1.0;\n    } else {\n        ch[0] = (index & 7) / 7.0;\n        ch[1] = sqrt(2 - ch[0] * ch[0]);\n        if (flag)\n            FFSWAP(float, ch[0], ch[1]);\n    }\n}']