libavcodec/dcadec.c:1200: error: Buffer Overrun L3
  Offset: [-3, 6] Size: 32.

libavcodec/dcadec.c:1195:22: <Offset trace>
1193.             if (s->prediction_mode[k][l]) {
1194.                 int n;
1195.                 for (m = 0; m < 8; m++) {
                           ^
1196.                     for (n = 1; n <= 4; n++)
1197.                         if (m >= n)

libavcodec/dcadec.c:1195:22: Assignment
1193.             if (s->prediction_mode[k][l]) {
1194.                 int n;
1195.                 for (m = 0; m < 8; m++) {
                           ^
1196.                     for (n = 1; n <= 4; n++)
1197.                         if (m >= n)

libavcodec/dcadec.c:1099:1: <Length trace>
1097. #endif
1098. 
1099. static int dca_subsubframe(DCAContext *s, int base_channel, int block_index)
      ^
1100. {
1101.     int k, l;

libavcodec/dcadec.c:1099:1: Parameter `s->subband_samples[*][*][*]`
1097. #endif
1098. 
1099. static int dca_subsubframe(DCAContext *s, int base_channel, int block_index)
      ^
1100. {
1101.     int k, l;

libavcodec/dcadec.c:1200:34: Array access: Offset: [-3, 6] Size: 32
1198.                             subband_samples[k][l][m] +=
1199.                                 (adpcm_vb[s->prediction_vq[k][l]][n - 1] *
1200.                                  subband_samples[k][l][m - n] / 8192);
                                       ^
1201.                         else if (s->predictor_history)
1202.                             subband_samples[k][l][m] +=

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;
                for (m = 0; m < 8; m++) {
                    for (n = 1; n <= 4; n++)
                        if (m >= n)
                            subband_samples[k][l][m] +=
                                (adpcm_vb[s->prediction_vq[k][l]][n - 1] *
                                 subband_samples[k][l][m - n] / 8192);
                        else if (s->predictor_history)
                            subband_samples[k][l][m] +=
                                (adpcm_vb[s->prediction_vq[k][l]][n - 1] *
                                 s->subband_samples_hist[k][l][m - n + 4] / 8192);
                }
            }
        }
        for (l = s->vq_start_subband[k]; l < s->subband_activity[k]; l++) {
            int hfvq = s->high_freq_vq[k][l];
            if (!s->debug_flag & 0x01) {
                av_log(s->avctx, AV_LOG_DEBUG,
                       "Stream with high frequencies VQ coding\n");
                s->debug_flag |= 0x01;
            }
            int8x8_fmul_int32(&s->dcadsp, subband_samples[k][l],
                              &high_freq_vq[hfvq][subsubframe * 8],
                              s->scale_factor[k][l][0]);
        }
    }
    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                for (m = 0; m < 8; m++) {\n                    for (n = 1; n <= 4; n++)\n                        if (m >= n)\n                            subband_samples[k][l][m] +=\n                                (adpcm_vb[s->prediction_vq[k][l]][n - 1] *\n                                 subband_samples[k][l][m - n] / 8192);\n                        else if (s->predictor_history)\n                            subband_samples[k][l][m] +=\n                                (adpcm_vb[s->prediction_vq[k][l]][n - 1] *\n                                 s->subband_samples_hist[k][l][m - n + 4] / 8192);\n                }\n            }\n        }\n        for (l = s->vq_start_subband[k]; l < s->subband_activity[k]; l++) {\n            int hfvq = s->high_freq_vq[k][l];\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            int8x8_fmul_int32(&s->dcadsp, subband_samples[k][l],\n                              &high_freq_vq[hfvq][subsubframe * 8],\n                              s->scale_factor[k][l][0]);\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}']