libavcodec/aacsbr.c:1457: error: Buffer Overrun L1
  Offset added: 336 Size: 48.

libavcodec/aacsbr.c:1452:1: <Length trace>
1450.  * (14496-3 sp04 p217)
1451.  */
1452. static void sbr_mapping(AACContext *ac, SpectralBandReplication *sbr,
      ^
1453.                         SBRData *ch_data, int e_a[2])
1454. {

libavcodec/aacsbr.c:1452:1: Parameter `ch_data->s_indexmapped[*][*]`
1450.  * (14496-3 sp04 p217)
1451.  */
1452. static void sbr_mapping(AACContext *ac, SpectralBandReplication *sbr,
      ^
1453.                         SBRData *ch_data, int e_a[2])
1454. {

libavcodec/aacsbr.c:1457:5: Array access: Offset added: 336 Size: 48
1455.     int e, i, m;
1456. 
1457.     memset(ch_data->s_indexmapped[1], 0, 7*sizeof(ch_data->s_indexmapped[1]));
          ^
1458.     for (e = 0; e < ch_data->bs_num_env[1]; e++) {
1459.         const unsigned int ilim = sbr->n[ch_data->bs_freq_res[e + 1]];

static void sbr_mapping(AACContext *ac, SpectralBandReplication *sbr,
                        SBRData *ch_data, int e_a[2])
{
    int e, i, m;
    memset(ch_data->s_indexmapped[1], 0, 7*sizeof(ch_data->s_indexmapped[1]));
    for (e = 0; e < ch_data->bs_num_env[1]; e++) {
        const unsigned int ilim = sbr->n[ch_data->bs_freq_res[e + 1]];
        uint16_t *table = ch_data->bs_freq_res[e + 1] ? sbr->f_tablehigh : sbr->f_tablelow;
        int k;
        for (i = 0; i < ilim; i++)
            for (m = table[i]; m < table[i + 1]; m++)
                sbr->e_origmapped[e][m - sbr->kx[1]] = ch_data->env_facs[e+1][i];
        k = (ch_data->bs_num_noise > 1) && (ch_data->t_env[e] >= ch_data->t_q[1]);
        for (i = 0; i < sbr->n_q; i++)
            for (m = sbr->f_tablenoise[i]; m < sbr->f_tablenoise[i + 1]; m++)
                sbr->q_mapped[e][m - sbr->kx[1]] = ch_data->noise_facs[k+1][i];
        for (i = 0; i < sbr->n[1]; i++) {
            if (ch_data->bs_add_harmonic_flag) {
                const unsigned int m_midpoint =
                    (sbr->f_tablehigh[i] + sbr->f_tablehigh[i + 1]) >> 1;
                ch_data->s_indexmapped[e + 1][m_midpoint - sbr->kx[1]] = ch_data->bs_add_harmonic[i] *
                    (e >= e_a[1] || (ch_data->s_indexmapped[0][m_midpoint - sbr->kx[1]] == 1));
            }
        }
        for (i = 0; i < ilim; i++) {
            int additional_sinusoid_present = 0;
            for (m = table[i]; m < table[i + 1]; m++) {
                if (ch_data->s_indexmapped[e + 1][m - sbr->kx[1]]) {
                    additional_sinusoid_present = 1;
                    break;
                }
            }
            memset(&sbr->s_mapped[e][table[i] - sbr->kx[1]], additional_sinusoid_present,
                   (table[i + 1] - table[i]) * sizeof(sbr->s_mapped[e][0]));
        }
    }
    memcpy(ch_data->s_indexmapped[0], ch_data->s_indexmapped[ch_data->bs_num_env[1]], sizeof(ch_data->s_indexmapped[0]));
}
['static void sbr_mapping(AACContext *ac, SpectralBandReplication *sbr,\n                        SBRData *ch_data, int e_a[2])\n{\n    int e, i, m;\n    memset(ch_data->s_indexmapped[1], 0, 7*sizeof(ch_data->s_indexmapped[1]));\n    for (e = 0; e < ch_data->bs_num_env[1]; e++) {\n        const unsigned int ilim = sbr->n[ch_data->bs_freq_res[e + 1]];\n        uint16_t *table = ch_data->bs_freq_res[e + 1] ? sbr->f_tablehigh : sbr->f_tablelow;\n        int k;\n        for (i = 0; i < ilim; i++)\n            for (m = table[i]; m < table[i + 1]; m++)\n                sbr->e_origmapped[e][m - sbr->kx[1]] = ch_data->env_facs[e+1][i];\n        k = (ch_data->bs_num_noise > 1) && (ch_data->t_env[e] >= ch_data->t_q[1]);\n        for (i = 0; i < sbr->n_q; i++)\n            for (m = sbr->f_tablenoise[i]; m < sbr->f_tablenoise[i + 1]; m++)\n                sbr->q_mapped[e][m - sbr->kx[1]] = ch_data->noise_facs[k+1][i];\n        for (i = 0; i < sbr->n[1]; i++) {\n            if (ch_data->bs_add_harmonic_flag) {\n                const unsigned int m_midpoint =\n                    (sbr->f_tablehigh[i] + sbr->f_tablehigh[i + 1]) >> 1;\n                ch_data->s_indexmapped[e + 1][m_midpoint - sbr->kx[1]] = ch_data->bs_add_harmonic[i] *\n                    (e >= e_a[1] || (ch_data->s_indexmapped[0][m_midpoint - sbr->kx[1]] == 1));\n            }\n        }\n        for (i = 0; i < ilim; i++) {\n            int additional_sinusoid_present = 0;\n            for (m = table[i]; m < table[i + 1]; m++) {\n                if (ch_data->s_indexmapped[e + 1][m - sbr->kx[1]]) {\n                    additional_sinusoid_present = 1;\n                    break;\n                }\n            }\n            memset(&sbr->s_mapped[e][table[i] - sbr->kx[1]], additional_sinusoid_present,\n                   (table[i + 1] - table[i]) * sizeof(sbr->s_mapped[e][0]));\n        }\n    }\n    memcpy(ch_data->s_indexmapped[0], ch_data->s_indexmapped[ch_data->bs_num_env[1]], sizeof(ch_data->s_indexmapped[0]));\n}']