libavcodec/aacsbr.c:586: error: Integer Overflow L2
  ([2, 6] - [1, 5]):unsigned32.

libavcodec/aacsbr.c:585:10: <LHS trace>
583.     sbr->f_tablenoise[0] = sbr->f_tablelow[0];
584.     temp = 0;
585.     for (k = 1; k <= sbr->n_q; k++) {
              ^
586.         temp += (sbr->n[0] - temp) / (sbr->n_q + 1 - k);
587.         sbr->f_tablenoise[k] = sbr->f_tablelow[temp];

libavcodec/aacsbr.c:585:10: Assignment
583.     sbr->f_tablenoise[0] = sbr->f_tablelow[0];
584.     temp = 0;
585.     for (k = 1; k <= sbr->n_q; k++) {
              ^
586.         temp += (sbr->n[0] - temp) / (sbr->n_q + 1 - k);
587.         sbr->f_tablenoise[k] = sbr->f_tablelow[temp];

libavcodec/aacsbr.c:585:10: <RHS trace>
583.     sbr->f_tablenoise[0] = sbr->f_tablelow[0];
584.     temp = 0;
585.     for (k = 1; k <= sbr->n_q; k++) {
              ^
586.         temp += (sbr->n[0] - temp) / (sbr->n_q + 1 - k);
587.         sbr->f_tablenoise[k] = sbr->f_tablelow[temp];

libavcodec/aacsbr.c:585:10: Assignment
583.     sbr->f_tablenoise[0] = sbr->f_tablelow[0];
584.     temp = 0;
585.     for (k = 1; k <= sbr->n_q; k++) {
              ^
586.         temp += (sbr->n[0] - temp) / (sbr->n_q + 1 - k);
587.         sbr->f_tablenoise[k] = sbr->f_tablelow[temp];

libavcodec/aacsbr.c:586:9: Binary operation: ([2, 6] - [1, 5]):unsigned32
584.     temp = 0;
585.     for (k = 1; k <= sbr->n_q; k++) {
586.         temp += (sbr->n[0] - temp) / (sbr->n_q + 1 - k);
             ^
587.         sbr->f_tablenoise[k] = sbr->f_tablelow[temp];
588.     }

static int sbr_make_f_derived(AACContext *ac, SpectralBandReplication *sbr)
{
    int k, temp;
    sbr->n[1] = sbr->n_master - sbr->spectrum_params.bs_xover_band;
    sbr->n[0] = (sbr->n[1] + 1) >> 1;
    memcpy(sbr->f_tablehigh, &sbr->f_master[sbr->spectrum_params.bs_xover_band],
           (sbr->n[1] + 1) * sizeof(sbr->f_master[0]));
    sbr->m[1] = sbr->f_tablehigh[sbr->n[1]] - sbr->f_tablehigh[0];
    sbr->kx[1] = sbr->f_tablehigh[0];
    if (sbr->kx[1] + sbr->m[1] > 64) {
        av_log(ac->avccontext, AV_LOG_ERROR,
               "Stop frequency border too high: %d\n", sbr->kx[1] + sbr->m[1]);
        return -1;
    }
    if (sbr->kx[1] > 32) {
        av_log(ac->avccontext, AV_LOG_ERROR, "Start frequency border too high: %d\n", sbr->kx[1]);
        return -1;
    }
    sbr->f_tablelow[0] = sbr->f_tablehigh[0];
    temp = sbr->n[1] & 1;
    for (k = 1; k <= sbr->n[0]; k++)
        sbr->f_tablelow[k] = sbr->f_tablehigh[2 * k - temp];
    sbr->n_q = FFMAX(1, lrintf(sbr->spectrum_params.bs_noise_bands *
                               log2f(sbr->k[2] / (float)sbr->kx[1])));
    if (sbr->n_q > 5) {
        av_log(ac->avccontext, AV_LOG_ERROR, "Too many noise floor scale factors: %d\n", sbr->n_q);
        return -1;
    }
    sbr->f_tablenoise[0] = sbr->f_tablelow[0];
    temp = 0;
    for (k = 1; k <= sbr->n_q; k++) {
        temp += (sbr->n[0] - temp) / (sbr->n_q + 1 - k);
        sbr->f_tablenoise[k] = sbr->f_tablelow[temp];
    }
    if (sbr_hf_calc_npatches(ac, sbr) < 0)
        return -1;
    sbr_make_f_tablelim(sbr);
    sbr->data[0].f_indexnoise = 0;
    sbr->data[1].f_indexnoise = 0;
    return 0;
}
['static int sbr_make_f_derived(AACContext *ac, SpectralBandReplication *sbr)\n{\n    int k, temp;\n    sbr->n[1] = sbr->n_master - sbr->spectrum_params.bs_xover_band;\n    sbr->n[0] = (sbr->n[1] + 1) >> 1;\n    memcpy(sbr->f_tablehigh, &sbr->f_master[sbr->spectrum_params.bs_xover_band],\n           (sbr->n[1] + 1) * sizeof(sbr->f_master[0]));\n    sbr->m[1] = sbr->f_tablehigh[sbr->n[1]] - sbr->f_tablehigh[0];\n    sbr->kx[1] = sbr->f_tablehigh[0];\n    if (sbr->kx[1] + sbr->m[1] > 64) {\n        av_log(ac->avccontext, AV_LOG_ERROR,\n               "Stop frequency border too high: %d\\n", sbr->kx[1] + sbr->m[1]);\n        return -1;\n    }\n    if (sbr->kx[1] > 32) {\n        av_log(ac->avccontext, AV_LOG_ERROR, "Start frequency border too high: %d\\n", sbr->kx[1]);\n        return -1;\n    }\n    sbr->f_tablelow[0] = sbr->f_tablehigh[0];\n    temp = sbr->n[1] & 1;\n    for (k = 1; k <= sbr->n[0]; k++)\n        sbr->f_tablelow[k] = sbr->f_tablehigh[2 * k - temp];\n    sbr->n_q = FFMAX(1, lrintf(sbr->spectrum_params.bs_noise_bands *\n                               log2f(sbr->k[2] / (float)sbr->kx[1])));\n    if (sbr->n_q > 5) {\n        av_log(ac->avccontext, AV_LOG_ERROR, "Too many noise floor scale factors: %d\\n", sbr->n_q);\n        return -1;\n    }\n    sbr->f_tablenoise[0] = sbr->f_tablelow[0];\n    temp = 0;\n    for (k = 1; k <= sbr->n_q; k++) {\n        temp += (sbr->n[0] - temp) / (sbr->n_q + 1 - k);\n        sbr->f_tablenoise[k] = sbr->f_tablelow[temp];\n    }\n    if (sbr_hf_calc_npatches(ac, sbr) < 0)\n        return -1;\n    sbr_make_f_tablelim(sbr);\n    sbr->data[0].f_indexnoise = 0;\n    sbr->data[1].f_indexnoise = 0;\n    return 0;\n}']