libavcodec/aacsbr.c:1374: error: Buffer Overrun L3
  Offset: [-30, 39] Size: 40.

libavcodec/aacsbr.c:1360:14: <Offset trace>
1358.     memset(X, 0, 2*sizeof(*X));
1359.     for (k = 0; k < sbr->kx[0]; k++) {
1360.         for (i = 0; i < i_Temp; i++) {
                   ^
1361.             X[0][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][0];
1362.             X[1][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][1];

libavcodec/aacsbr.c:1360:14: Assignment
1358.     memset(X, 0, 2*sizeof(*X));
1359.     for (k = 0; k < sbr->kx[0]; k++) {
1360.         for (i = 0; i < i_Temp; i++) {
                   ^
1361.             X[0][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][0];
1362.             X[1][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][1];

libavcodec/aacsbr.c:1373:14: Assignment
1371. 
1372.     for (k = 0; k < sbr->kx[1]; k++) {
1373.         for (i = i_Temp; i < 38; i++) {
                   ^
1374.             X[0][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][0];
1375.             X[1][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][1];

libavcodec/aacsbr.c:1351:1: <Length trace>
1349. 
1350. /// Generate the subband filtered lowband
1351. static int sbr_x_gen(SpectralBandReplication *sbr, float X[2][38][64],
      ^
1352.                      const float Y0[38][64][2], const float Y1[38][64][2],
1353.                      const float X_low[32][40][2], int ch)

libavcodec/aacsbr.c:1351:1: Parameter `(*X_low)[*]`
1349. 
1350. /// Generate the subband filtered lowband
1351. static int sbr_x_gen(SpectralBandReplication *sbr, float X[2][38][64],
      ^
1352.                      const float Y0[38][64][2], const float Y1[38][64][2],
1353.                      const float X_low[32][40][2], int ch)

libavcodec/aacsbr.c:1374:26: Array access: Offset: [-30, 39] Size: 40
1372.     for (k = 0; k < sbr->kx[1]; k++) {
1373.         for (i = i_Temp; i < 38; i++) {
1374.             X[0][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][0];
                               ^
1375.             X[1][i][k] = X_low[k][i + ENVELOPE_ADJUSTMENT_OFFSET][1];
1376.         }

static int sbr_x_gen(SpectralBandReplication *sbr, float X[2][38][64],
                     const float Y0[38][64][2], const float Y1[38][64][2],
                     const float X_low[32][40][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] = Y0[i + i_f][k][0];
            X[1][i][k] = Y0[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] = Y1[i][k][0];
            X[1][i][k] = Y1[i][k][1];
        }
    }
    return 0;
}
['static int sbr_x_gen(SpectralBandReplication *sbr, float X[2][38][64],\n                     const float Y0[38][64][2], const float Y1[38][64][2],\n                     const float X_low[32][40][2], 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] = Y0[i + i_f][k][0];\n            X[1][i][k] = Y0[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] = Y1[i][k][0];\n            X[1][i][k] = Y1[i][k][1];\n        }\n    }\n    return 0;\n}']