libavcodec/aacsbr.c:1749: error: Buffer Overrun L2
  Offset: [1, 2] (⇐ [0, 1] + 1) Size: 2 by call to `sbr_x_gen`.

libavcodec/aacsbr.c:1717:1: Parameter `sbr->X[*]`
1715. }
1716. 
1717. void ff_sbr_apply(AACContext *ac, SpectralBandReplication *sbr, int id_aac,
      ^
1718.                   float* L, float* R)
1719. {

libavcodec/aacsbr.c:1749:9: Call
1747. 
1748.         /* synthesis */
1749.         sbr_x_gen(sbr, sbr->X[ch], sbr->X_low, sbr->data[ch].Y, ch);
              ^
1750.     }
1751. 

libavcodec/aacsbr.c:1413:1: <Length trace>
1411. 
1412. /// Generate the subband filtered lowband
1413. static int sbr_x_gen(SpectralBandReplication *sbr, float X[2][38][64],
      ^
1414.                      const float X_low[32][40][2], const float Y[2][38][64][2],
1415.                      int ch)

libavcodec/aacsbr.c:1413:1: Parameter `*X`
  1411. 
  1412. /// Generate the subband filtered lowband
  1413. static int sbr_x_gen(SpectralBandReplication *sbr, float X[2][38][64],
        ^
  1414.                      const float X_low[32][40][2], const float Y[2][38][64][2],
  1415.                      int ch)

libavcodec/aacsbr.c:1424:13: Array access: Offset: [1, 2] (⇐ [0, 1] + 1) Size: 2 by call to `sbr_x_gen` 
  1422.         for (i = 0; i < i_Temp; i++) {
  1423.             X[0][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][0];
  1424.             X[1][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][1];
                    ^
  1425.         }
  1426.     }

static int sbr_x_gen(SpectralBandReplication *sbr, float X[2][38][64],
                     const float X_low[32][40][2], const float Y[2][38][64][2],
                     int ch)
{
    int k, i;
    const int i_f = 32;
    const int i_Temp = FFMAX(2*sbr->data[ch].t_env_num_env_old - i_f, 0);
    memset(X, 0, 2*sizeof(*X));
    for (k = 0; k < sbr->kx[0]; k++) {
        for (i = 0; i < i_Temp; i++) {
            X[0][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][0];
            X[1][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][1];
        }
    }
    for (; k < sbr->kx[0] + sbr->m[0]; k++) {
        for (i = 0; i < i_Temp; i++) {
            X[0][i][k] = Y[0][i + i_f][k][0];
            X[1][i][k] = Y[0][i + i_f][k][1];
        }
    }
    for (k = 0; k < sbr->kx[1]; k++) {
        for (i = i_Temp; i < 38; i++) {
            X[0][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][0];
            X[1][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][1];
        }
    }
    for (; k < sbr->kx[1] + sbr->m[1]; k++) {
        for (i = i_Temp; i < i_f; i++) {
            X[0][i][k] = Y[1][i][k][0];
            X[1][i][k] = Y[1][i][k][1];
        }
    }
    return 0;
}
['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    if (ac->m4ac.ps == 1) {\n        if (sbr->ps.start) {\n            ff_ps_apply(ac->avctx, &sbr->ps, sbr->X[0], sbr->X[1], sbr->kx[1] + sbr->m[1]);\n        } else {\n            memcpy(sbr->X[1], sbr->X[0], sizeof(sbr->X[0]));\n        }\n        nch = 2;\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 int sbr_x_gen(SpectralBandReplication *sbr, float X[2][38][64],\n                     const float X_low[32][40][2], const float Y[2][38][64][2],\n                     int ch)\n{\n    int k, i;\n    const int i_f = 32;\n    const int i_Temp = FFMAX(2*sbr->data[ch].t_env_num_env_old - i_f, 0);\n    memset(X, 0, 2*sizeof(*X));\n    for (k = 0; k < sbr->kx[0]; k++) {\n        for (i = 0; i < i_Temp; i++) {\n            X[0][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][0];\n            X[1][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][1];\n        }\n    }\n    for (; k < sbr->kx[0] + sbr->m[0]; k++) {\n        for (i = 0; i < i_Temp; i++) {\n            X[0][i][k] = Y[0][i + i_f][k][0];\n            X[1][i][k] = Y[0][i + i_f][k][1];\n        }\n    }\n    for (k = 0; k < sbr->kx[1]; k++) {\n        for (i = i_Temp; i < 38; i++) {\n            X[0][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][0];\n            X[1][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][1];\n        }\n    }\n    for (; k < sbr->kx[1] + sbr->m[1]; k++) {\n        for (i = i_Temp; i < i_f; i++) {\n            X[0][i][k] = Y[1][i][k][0];\n            X[1][i][k] = Y[1][i][k][1];\n        }\n    }\n    return 0;\n}']