libavcodec/aacsbr.c:1749: error: Buffer Overrun L1
  Offset: 2 (⇐ 1 + 1) Size: 2 by call to `sbr_qmf_synthesis`.

libavcodec/aacsbr.c:1709:1: Parameter `sbr->X[*]`
1707. }
1708. 
1709. void ff_sbr_apply(AACContext *ac, SpectralBandReplication *sbr, int id_aac,
      ^
1710.                   float* L, float* R)
1711. {

libavcodec/aacsbr.c:1749:9: Call
1747.                       ac->add_bias, -1024 * ac->sf_scale);
1748.     if (nch == 2)
1749.         sbr_qmf_synthesis(&ac->dsp, &sbr->mdct, R, sbr->X[1], sbr->qmf_filter_scratch,
              ^
1750.                           sbr->data[1].synthesis_filterbank_samples,
1751.                           &sbr->data[1].synthesis_filterbank_samples_offset,

libavcodec/aacsbr.c:1168:1: <Length trace>
1166.  * (14496-3 sp04 p206)
1167.  */
1168. static void sbr_qmf_synthesis(DSPContext *dsp, FFTContext *mdct,
      ^
1169.                               float *out, float X[2][32][64],
1170.                               float mdct_buf[2][64],

libavcodec/aacsbr.c:1168:1: Parameter `*X`
  1166.  * (14496-3 sp04 p206)
  1167.  */
  1168. static void sbr_qmf_synthesis(DSPContext *dsp, FFTContext *mdct,
        ^
  1169.                               float *out, float X[2][32][64],
  1170.                               float mdct_buf[2][64],

libavcodec/aacsbr.c:1190:34: Array access: Offset: 2 (⇐ 1 + 1) Size: 2 by call to `sbr_qmf_synthesis` 
  1188.             for (n = 0; n < 32; n++) {
  1189.                 X[0][i][   n] = -X[0][i][n];
  1190.                 X[0][i][32+n] =  X[1][i][31-n];
                                         ^
  1191.             }
  1192.             ff_imdct_half(mdct, mdct_buf[0], X[0][i]);

static void sbr_qmf_synthesis(DSPContext *dsp, FFTContext *mdct,
                              float *out, float X[2][32][64],
                              float mdct_buf[2][64],
                              float *v0, int *v_off, const unsigned int div,
                              float bias, float scale)
{
    int i, n;
    const float *sbr_qmf_window = div ? sbr_qmf_window_ds : sbr_qmf_window_us;
    int scale_and_bias = scale != 1.0f || bias != 0.0f;
    float *v;
    for (i = 0; i < 32; i++) {
        if (*v_off == 0) {
            int saved_samples = (1280 - 128) >> div;
            memcpy(&v0[SBR_SYNTHESIS_BUF_SIZE - saved_samples], v0, saved_samples * sizeof(float));
            *v_off = SBR_SYNTHESIS_BUF_SIZE - saved_samples - (128 >> div);
        } else {
            *v_off -= 128 >> div;
        }
        v = v0 + *v_off;
        if (div) {
            for (n = 0; n < 32; n++) {
                X[0][i][   n] = -X[0][i][n];
                X[0][i][32+n] =  X[1][i][31-n];
            }
            ff_imdct_half(mdct, mdct_buf[0], X[0][i]);
            for (n = 0; n < 32; n++) {
                v[     n] =  mdct_buf[0][63 - 2*n];
                v[63 - n] = -mdct_buf[0][62 - 2*n];
            }
        } else {
            for (n = 1; n < 64; n+=2) {
                X[1][i][n] = -X[1][i][n];
            }
            ff_imdct_half(mdct, mdct_buf[0], X[0][i]);
            ff_imdct_half(mdct, mdct_buf[1], X[1][i]);
            for (n = 0; n < 64; n++) {
                v[      n] = -mdct_buf[0][63 -   n] + mdct_buf[1][  n    ];
                v[127 - n] =  mdct_buf[0][63 -   n] + mdct_buf[1][  n    ];
            }
        }
        dsp->vector_fmul_add(out, v                , sbr_qmf_window               , zero64, 64 >> div);
        dsp->vector_fmul_add(out, v + ( 192 >> div), sbr_qmf_window + ( 64 >> div), out   , 64 >> div);
        dsp->vector_fmul_add(out, v + ( 256 >> div), sbr_qmf_window + (128 >> div), out   , 64 >> div);
        dsp->vector_fmul_add(out, v + ( 448 >> div), sbr_qmf_window + (192 >> div), out   , 64 >> div);
        dsp->vector_fmul_add(out, v + ( 512 >> div), sbr_qmf_window + (256 >> div), out   , 64 >> div);
        dsp->vector_fmul_add(out, v + ( 704 >> div), sbr_qmf_window + (320 >> div), out   , 64 >> div);
        dsp->vector_fmul_add(out, v + ( 768 >> div), sbr_qmf_window + (384 >> div), out   , 64 >> div);
        dsp->vector_fmul_add(out, v + ( 960 >> div), sbr_qmf_window + (448 >> div), out   , 64 >> div);
        dsp->vector_fmul_add(out, v + (1024 >> div), sbr_qmf_window + (512 >> div), out   , 64 >> div);
        dsp->vector_fmul_add(out, v + (1216 >> div), sbr_qmf_window + (576 >> div), out   , 64 >> div);
        if (scale_and_bias)
            for (n = 0; n < 64 >> div; n++)
                out[n] = out[n] * scale + bias;
        out += 64 >> div;
    }
}
['void ff_sbr_apply(AACContext *ac, SpectralBandReplication *sbr, int id_aac,\n                  float* L, float* R)\n{\n    int downsampled = ac->m4ac.ext_sample_rate < sbr->sample_rate;\n    int ch;\n    int nch = (id_aac == TYPE_CPE) ? 2 : 1;\n    if (sbr->start) {\n        sbr_dequant(sbr, id_aac);\n    }\n    for (ch = 0; ch < nch; ch++) {\n        sbr_qmf_analysis(&ac->dsp, &sbr->mdct_ana, ch ? R : L, sbr->data[ch].analysis_filterbank_samples,\n                         (float*)sbr->qmf_filter_scratch,\n                         sbr->data[ch].W, 1/(-1024 * ac->sf_scale));\n        sbr_lf_gen(ac, sbr, sbr->X_low, sbr->data[ch].W);\n        if (sbr->start) {\n            sbr_hf_inverse_filter(sbr->alpha0, sbr->alpha1, sbr->X_low, sbr->k[0]);\n            sbr_chirp(sbr, &sbr->data[ch]);\n            sbr_hf_gen(ac, sbr, sbr->X_high, sbr->X_low, sbr->alpha0, sbr->alpha1,\n                       sbr->data[ch].bw_array, sbr->data[ch].t_env,\n                       sbr->data[ch].bs_num_env);\n            sbr_mapping(ac, sbr, &sbr->data[ch], sbr->data[ch].e_a);\n            sbr_env_estimate(sbr->e_curr, sbr->X_high, sbr, &sbr->data[ch]);\n            sbr_gain_calc(ac, sbr, &sbr->data[ch], sbr->data[ch].e_a);\n            sbr_hf_assemble(sbr->data[ch].Y, sbr->X_high, sbr, &sbr->data[ch],\n                            sbr->data[ch].e_a);\n        }\n        sbr_x_gen(sbr, sbr->X[ch], sbr->X_low, sbr->data[ch].Y, ch);\n    }\n    sbr_qmf_synthesis(&ac->dsp, &sbr->mdct, L, sbr->X[0], sbr->qmf_filter_scratch,\n                      sbr->data[0].synthesis_filterbank_samples,\n                      &sbr->data[0].synthesis_filterbank_samples_offset,\n                      downsampled,\n                      ac->add_bias, -1024 * ac->sf_scale);\n    if (nch == 2)\n        sbr_qmf_synthesis(&ac->dsp, &sbr->mdct, R, sbr->X[1], sbr->qmf_filter_scratch,\n                          sbr->data[1].synthesis_filterbank_samples,\n                          &sbr->data[1].synthesis_filterbank_samples_offset,\n                          downsampled,\n                          ac->add_bias, -1024 * ac->sf_scale);\n}', 'static void sbr_qmf_synthesis(DSPContext *dsp, FFTContext *mdct,\n                              float *out, float X[2][32][64],\n                              float mdct_buf[2][64],\n                              float *v0, int *v_off, const unsigned int div,\n                              float bias, float scale)\n{\n    int i, n;\n    const float *sbr_qmf_window = div ? sbr_qmf_window_ds : sbr_qmf_window_us;\n    int scale_and_bias = scale != 1.0f || bias != 0.0f;\n    float *v;\n    for (i = 0; i < 32; i++) {\n        if (*v_off == 0) {\n            int saved_samples = (1280 - 128) >> div;\n            memcpy(&v0[SBR_SYNTHESIS_BUF_SIZE - saved_samples], v0, saved_samples * sizeof(float));\n            *v_off = SBR_SYNTHESIS_BUF_SIZE - saved_samples - (128 >> div);\n        } else {\n            *v_off -= 128 >> div;\n        }\n        v = v0 + *v_off;\n        if (div) {\n            for (n = 0; n < 32; n++) {\n                X[0][i][   n] = -X[0][i][n];\n                X[0][i][32+n] =  X[1][i][31-n];\n            }\n            ff_imdct_half(mdct, mdct_buf[0], X[0][i]);\n            for (n = 0; n < 32; n++) {\n                v[     n] =  mdct_buf[0][63 - 2*n];\n                v[63 - n] = -mdct_buf[0][62 - 2*n];\n            }\n        } else {\n            for (n = 1; n < 64; n+=2) {\n                X[1][i][n] = -X[1][i][n];\n            }\n            ff_imdct_half(mdct, mdct_buf[0], X[0][i]);\n            ff_imdct_half(mdct, mdct_buf[1], X[1][i]);\n            for (n = 0; n < 64; n++) {\n                v[      n] = -mdct_buf[0][63 -   n] + mdct_buf[1][  n    ];\n                v[127 - n] =  mdct_buf[0][63 -   n] + mdct_buf[1][  n    ];\n            }\n        }\n        dsp->vector_fmul_add(out, v                , sbr_qmf_window               , zero64, 64 >> div);\n        dsp->vector_fmul_add(out, v + ( 192 >> div), sbr_qmf_window + ( 64 >> div), out   , 64 >> div);\n        dsp->vector_fmul_add(out, v + ( 256 >> div), sbr_qmf_window + (128 >> div), out   , 64 >> div);\n        dsp->vector_fmul_add(out, v + ( 448 >> div), sbr_qmf_window + (192 >> div), out   , 64 >> div);\n        dsp->vector_fmul_add(out, v + ( 512 >> div), sbr_qmf_window + (256 >> div), out   , 64 >> div);\n        dsp->vector_fmul_add(out, v + ( 704 >> div), sbr_qmf_window + (320 >> div), out   , 64 >> div);\n        dsp->vector_fmul_add(out, v + ( 768 >> div), sbr_qmf_window + (384 >> div), out   , 64 >> div);\n        dsp->vector_fmul_add(out, v + ( 960 >> div), sbr_qmf_window + (448 >> div), out   , 64 >> div);\n        dsp->vector_fmul_add(out, v + (1024 >> div), sbr_qmf_window + (512 >> div), out   , 64 >> div);\n        dsp->vector_fmul_add(out, v + (1216 >> div), sbr_qmf_window + (576 >> div), out   , 64 >> div);\n        if (scale_and_bias)\n            for (n = 0; n < 64 >> div; n++)\n                out[n] = out[n] * scale + bias;\n        out += 64 >> div;\n    }\n}']