libavcodec/dcadec.c:1202: error: Buffer Overrun L2
  Offset: [1, 5] Size: 4.

libavcodec/dcadec.c:1193:22: <Offset trace>
1191.                                                  s->subband_samples_hist[k][l][0]) *
1192.                                                 (1.0f / 8192);
1193.                 for (m = 1; m < 8; m++) {
                           ^
1194.                     float sum = adpcm_vb[s->prediction_vq[k][l]][0] *
1195.                                 subband_samples[k][l][m - 1];

libavcodec/dcadec.c:1193:22: Assignment
1191.                                                  s->subband_samples_hist[k][l][0]) *
1192.                                                 (1.0f / 8192);
1193.                 for (m = 1; m < 8; m++) {
                           ^
1194.                     float sum = adpcm_vb[s->prediction_vq[k][l]][0] *
1195.                                 subband_samples[k][l][m - 1];

libavcodec/dcadec.c:1087:1: <Length trace>
1085. static const uint8_t abits_levels[7] = { 3,  5,  7,  9, 13, 17, 25 };
1086. 
1087. static int dca_subsubframe(DCAContext *s, int base_channel, int block_index)
      ^
1088. {
1089.     int k, l;

libavcodec/dcadec.c:1087:1: Parameter `s->subband_samples_hist[*][*][*]`
1085. static const uint8_t abits_levels[7] = { 3,  5,  7,  9, 13, 17, 25 };
1086. 
1087. static int dca_subsubframe(DCAContext *s, int base_channel, int block_index)
      ^
1088. {
1089.     int k, l;

libavcodec/dcadec.c:1202:36: Array access: Offset: [1, 5] Size: 4
1200.                         else if (s->predictor_history)
1201.                             sum += adpcm_vb[s->prediction_vq[k][l]][n - 1] *
1202.                                    s->subband_samples_hist[k][l][m - n + 4];
                                         ^
1203.                     subband_samples[k][l][m] += sum * 1.0f / 8192;
1204.                 }

static int dca_subsubframe(DCAContext *s, int base_channel, int block_index)
{
    int k, l;
    int subsubframe = s->current_subsubframe;
    const float *quant_step_table;
    float (*subband_samples)[DCA_SUBBANDS][8] = s->subband_samples[block_index];
    LOCAL_ALIGNED_16(int32_t, block, [8 * DCA_SUBBANDS]);
    if (s->bit_rate_index == 0x1f)
        quant_step_table = lossless_quant_d;
    else
        quant_step_table = lossy_quant_d;
    for (k = base_channel; k < s->prim_channels; k++) {
        float rscale[DCA_SUBBANDS];
        if (get_bits_left(&s->gb) < 0)
            return AVERROR_INVALIDDATA;
        for (l = 0; l < s->vq_start_subband[k]; l++) {
            int m;
            int abits = s->bitalloc[k][l];
            float quant_step_size = quant_step_table[abits];
            int sel = s->quant_index_huffman[k][abits];
            if (!abits) {
                rscale[l] = 0;
                memset(block + 8 * l, 0, 8 * sizeof(block[0]));
            } else {
                int sfi = s->transition_mode[k][l] && subsubframe >= s->transition_mode[k][l];
                rscale[l] = quant_step_size * s->scale_factor[k][l][sfi] *
                               s->scalefactor_adj[k][sel];
                if (abits >= 11 || !dca_smpl_bitalloc[abits].vlc[sel].table) {
                    if (abits <= 7) {
                        int block_code1, block_code2, size, levels, err;
                        size   = abits_sizes[abits - 1];
                        levels = abits_levels[abits - 1];
                        block_code1 = get_bits(&s->gb, size);
                        block_code2 = get_bits(&s->gb, size);
                        err = decode_blockcodes(block_code1, block_code2,
                                                levels, block + 8 * l);
                        if (err) {
                            av_log(s->avctx, AV_LOG_ERROR,
                                   "ERROR: block code look-up failed\n");
                            return AVERROR_INVALIDDATA;
                        }
                    } else {
                        for (m = 0; m < 8; m++)
                            block[8 * l + m] = get_sbits(&s->gb, abits - 3);
                    }
                } else {
                    for (m = 0; m < 8; m++)
                        block[8 * l + m] = get_bitalloc(&s->gb,
                                                &dca_smpl_bitalloc[abits], sel);
                }
            }
        }
        s->fmt_conv.int32_to_float_fmul_array8(&s->fmt_conv, subband_samples[k][0],
                                               block, rscale, 8 * s->vq_start_subband[k]);
        for (l = 0; l < s->vq_start_subband[k]; l++) {
            int m;
            if (s->prediction_mode[k][l]) {
                int n;
                if (s->predictor_history)
                    subband_samples[k][l][0] += (adpcm_vb[s->prediction_vq[k][l]][0] *
                                                 s->subband_samples_hist[k][l][3] +
                                                 adpcm_vb[s->prediction_vq[k][l]][1] *
                                                 s->subband_samples_hist[k][l][2] +
                                                 adpcm_vb[s->prediction_vq[k][l]][2] *
                                                 s->subband_samples_hist[k][l][1] +
                                                 adpcm_vb[s->prediction_vq[k][l]][3] *
                                                 s->subband_samples_hist[k][l][0]) *
                                                (1.0f / 8192);
                for (m = 1; m < 8; m++) {
                    float sum = adpcm_vb[s->prediction_vq[k][l]][0] *
                                subband_samples[k][l][m - 1];
                    for (n = 2; n <= 4; n++)
                        if (m >= n)
                            sum += adpcm_vb[s->prediction_vq[k][l]][n - 1] *
                                   subband_samples[k][l][m - n];
                        else if (s->predictor_history)
                            sum += adpcm_vb[s->prediction_vq[k][l]][n - 1] *
                                   s->subband_samples_hist[k][l][m - n + 4];
                    subband_samples[k][l][m] += sum * 1.0f / 8192;
                }
            }
        }
        if (s->subband_activity[k] > s->vq_start_subband[k]) {
            if (!s->debug_flag & 0x01) {
                av_log(s->avctx, AV_LOG_DEBUG,
                       "Stream with high frequencies VQ coding\n");
                s->debug_flag |= 0x01;
            }
            s->dcadsp.decode_hf(subband_samples[k], s->high_freq_vq[k],
                                high_freq_vq, subsubframe * 8,
                                s->scale_factor[k], s->vq_start_subband[k],
                                s->subband_activity[k]);
        }
    }
    if (s->aspf || subsubframe == s->subsubframes[s->current_subframe] - 1) {
        if (0xFFFF == get_bits(&s->gb, 16)) {
#ifdef TRACE
            av_log(s->avctx, AV_LOG_DEBUG, "Got subframe DSYNC\n");
#endif
        } else {
            av_log(s->avctx, AV_LOG_ERROR, "Didn't get subframe DSYNC\n");
            return AVERROR_INVALIDDATA;
        }
    }
    for (k = base_channel; k < s->prim_channels; k++)
        for (l = 0; l < s->vq_start_subband[k]; l++)
            AV_COPY128(s->subband_samples_hist[k][l], &subband_samples[k][l][4]);
    return 0;
}
['static int dca_subsubframe(DCAContext *s, int base_channel, int block_index)\n{\n    int k, l;\n    int subsubframe = s->current_subsubframe;\n    const float *quant_step_table;\n    float (*subband_samples)[DCA_SUBBANDS][8] = s->subband_samples[block_index];\n    LOCAL_ALIGNED_16(int32_t, block, [8 * DCA_SUBBANDS]);\n    if (s->bit_rate_index == 0x1f)\n        quant_step_table = lossless_quant_d;\n    else\n        quant_step_table = lossy_quant_d;\n    for (k = base_channel; k < s->prim_channels; k++) {\n        float rscale[DCA_SUBBANDS];\n        if (get_bits_left(&s->gb) < 0)\n            return AVERROR_INVALIDDATA;\n        for (l = 0; l < s->vq_start_subband[k]; l++) {\n            int m;\n            int abits = s->bitalloc[k][l];\n            float quant_step_size = quant_step_table[abits];\n            int sel = s->quant_index_huffman[k][abits];\n            if (!abits) {\n                rscale[l] = 0;\n                memset(block + 8 * l, 0, 8 * sizeof(block[0]));\n            } else {\n                int sfi = s->transition_mode[k][l] && subsubframe >= s->transition_mode[k][l];\n                rscale[l] = quant_step_size * s->scale_factor[k][l][sfi] *\n                               s->scalefactor_adj[k][sel];\n                if (abits >= 11 || !dca_smpl_bitalloc[abits].vlc[sel].table) {\n                    if (abits <= 7) {\n                        int block_code1, block_code2, size, levels, err;\n                        size   = abits_sizes[abits - 1];\n                        levels = abits_levels[abits - 1];\n                        block_code1 = get_bits(&s->gb, size);\n                        block_code2 = get_bits(&s->gb, size);\n                        err = decode_blockcodes(block_code1, block_code2,\n                                                levels, block + 8 * l);\n                        if (err) {\n                            av_log(s->avctx, AV_LOG_ERROR,\n                                   "ERROR: block code look-up failed\\n");\n                            return AVERROR_INVALIDDATA;\n                        }\n                    } else {\n                        for (m = 0; m < 8; m++)\n                            block[8 * l + m] = get_sbits(&s->gb, abits - 3);\n                    }\n                } else {\n                    for (m = 0; m < 8; m++)\n                        block[8 * l + m] = get_bitalloc(&s->gb,\n                                                &dca_smpl_bitalloc[abits], sel);\n                }\n            }\n        }\n        s->fmt_conv.int32_to_float_fmul_array8(&s->fmt_conv, subband_samples[k][0],\n                                               block, rscale, 8 * s->vq_start_subband[k]);\n        for (l = 0; l < s->vq_start_subband[k]; l++) {\n            int m;\n            if (s->prediction_mode[k][l]) {\n                int n;\n                if (s->predictor_history)\n                    subband_samples[k][l][0] += (adpcm_vb[s->prediction_vq[k][l]][0] *\n                                                 s->subband_samples_hist[k][l][3] +\n                                                 adpcm_vb[s->prediction_vq[k][l]][1] *\n                                                 s->subband_samples_hist[k][l][2] +\n                                                 adpcm_vb[s->prediction_vq[k][l]][2] *\n                                                 s->subband_samples_hist[k][l][1] +\n                                                 adpcm_vb[s->prediction_vq[k][l]][3] *\n                                                 s->subband_samples_hist[k][l][0]) *\n                                                (1.0f / 8192);\n                for (m = 1; m < 8; m++) {\n                    float sum = adpcm_vb[s->prediction_vq[k][l]][0] *\n                                subband_samples[k][l][m - 1];\n                    for (n = 2; n <= 4; n++)\n                        if (m >= n)\n                            sum += adpcm_vb[s->prediction_vq[k][l]][n - 1] *\n                                   subband_samples[k][l][m - n];\n                        else if (s->predictor_history)\n                            sum += adpcm_vb[s->prediction_vq[k][l]][n - 1] *\n                                   s->subband_samples_hist[k][l][m - n + 4];\n                    subband_samples[k][l][m] += sum * 1.0f / 8192;\n                }\n            }\n        }\n        if (s->subband_activity[k] > s->vq_start_subband[k]) {\n            if (!s->debug_flag & 0x01) {\n                av_log(s->avctx, AV_LOG_DEBUG,\n                       "Stream with high frequencies VQ coding\\n");\n                s->debug_flag |= 0x01;\n            }\n            s->dcadsp.decode_hf(subband_samples[k], s->high_freq_vq[k],\n                                high_freq_vq, subsubframe * 8,\n                                s->scale_factor[k], s->vq_start_subband[k],\n                                s->subband_activity[k]);\n        }\n    }\n    if (s->aspf || subsubframe == s->subsubframes[s->current_subframe] - 1) {\n        if (0xFFFF == get_bits(&s->gb, 16)) {\n#ifdef TRACE\n            av_log(s->avctx, AV_LOG_DEBUG, "Got subframe DSYNC\\n");\n#endif\n        } else {\n            av_log(s->avctx, AV_LOG_ERROR, "Didn\'t get subframe DSYNC\\n");\n            return AVERROR_INVALIDDATA;\n        }\n    }\n    for (k = base_channel; k < s->prim_channels; k++)\n        for (l = 0; l < s->vq_start_subband[k]; l++)\n            AV_COPY128(s->subband_samples_hist[k][l], &subband_samples[k][l][4]);\n    return 0;\n}']