libavresample/audio_mix.c:535: error: Buffer Overrun L3
  Offset added: 128 Size: [0, +oo].

libavresample/audio_mix.c:530:1: <Length trace>
528. }
529. 
530. static void reduce_matrix(AudioMix *am, const double *matrix, int stride)
     ^
531. {
532.     int i, o;

libavresample/audio_mix.c:530:1: Parameter `am->input_skip[*]`
528. }
529. 
530. static void reduce_matrix(AudioMix *am, const double *matrix, int stride)
     ^
531. {
532.     int i, o;

libavresample/audio_mix.c:535:5: Array access: Offset added: 128 Size: [0, +oo]
533. 
534.     memset(am->output_zero, 0, sizeof(am->output_zero));
535.     memset(am->input_skip,  0, sizeof(am->input_skip));
         ^
536.     memset(am->output_skip, 0, sizeof(am->output_skip));
537. 

static void reduce_matrix(AudioMix *am, const double *matrix, int stride)
{
    int i, o;
    memset(am->output_zero, 0, sizeof(am->output_zero));
    memset(am->input_skip,  0, sizeof(am->input_skip));
    memset(am->output_skip, 0, sizeof(am->output_skip));
    for (o = 0; o < am->out_channels; o++) {
        int zero = 1;
        for (i = 0; i < am->in_channels; i++) {
            if (matrix[o * stride + i] != 0.0) {
                zero = 0;
                break;
            }
        }
        if (o < am->in_channels) {
            for (i = 0; i < am->out_channels; i++) {
                if (matrix[i * stride + o] != 0.0) {
                    zero = 0;
                    break;
                }
            }
        }
        if (zero) {
            am->output_zero[o] = 1;
            am->out_matrix_channels--;
        }
    }
    if (am->out_matrix_channels == 0) {
        am->in_matrix_channels = 0;
        return;
    }
    for (i = 0; i < FFMIN(am->in_channels, am->out_channels); i++) {
        int skip = 1;
        for (o = 0; o < am->out_channels; o++) {
            int i0;
            if ((o != i && matrix[o * stride + i] != 0.0) ||
                (o == i && matrix[o * stride + i] != 1.0)) {
                skip = 0;
                break;
            }
            if (o == i) {
                for (i0 = 0; i0 < am->in_channels; i0++) {
                    if (i0 != i && matrix[o * stride + i0] != 0.0) {
                        skip = 0;
                        break;
                    }
                }
            }
        }
        if (skip) {
            am->input_skip[i] = 1;
            am->in_matrix_channels--;
        }
    }
    for (; i < am->in_channels; i++) {
        int contrib = 0;
        for (o = 0; o < am->out_channels; o++) {
            if (matrix[o * stride + i] != 0.0) {
                contrib = 1;
                break;
            }
        }
        if (!contrib) {
            am->input_skip[i] = 1;
            am->in_matrix_channels--;
        }
    }
    if (am->in_matrix_channels == 0) {
        am->out_matrix_channels = 0;
        return;
    }
    for (o = 0; o < FFMIN(am->in_channels, am->out_channels); o++) {
        int skip = 1;
        int o0;
        for (i = 0; i < am->in_channels; i++) {
            if ((o != i && matrix[o * stride + i] != 0.0) ||
                (o == i && matrix[o * stride + i] != 1.0)) {
                skip = 0;
                break;
            }
        }
        i = o;
        for (o0 = 0; o0 < am->out_channels; o0++) {
            if (o0 != i && matrix[o0 * stride + i] != 0.0) {
                skip = 0;
                break;
            }
        }
        if (skip) {
            am->output_skip[o] = 1;
            am->out_matrix_channels--;
        }
    }
    if (am->out_matrix_channels == 0) {
        am->in_matrix_channels = 0;
        return;
    }
}
['static void reduce_matrix(AudioMix *am, const double *matrix, int stride)\n{\n    int i, o;\n    memset(am->output_zero, 0, sizeof(am->output_zero));\n    memset(am->input_skip,  0, sizeof(am->input_skip));\n    memset(am->output_skip, 0, sizeof(am->output_skip));\n    for (o = 0; o < am->out_channels; o++) {\n        int zero = 1;\n        for (i = 0; i < am->in_channels; i++) {\n            if (matrix[o * stride + i] != 0.0) {\n                zero = 0;\n                break;\n            }\n        }\n        if (o < am->in_channels) {\n            for (i = 0; i < am->out_channels; i++) {\n                if (matrix[i * stride + o] != 0.0) {\n                    zero = 0;\n                    break;\n                }\n            }\n        }\n        if (zero) {\n            am->output_zero[o] = 1;\n            am->out_matrix_channels--;\n        }\n    }\n    if (am->out_matrix_channels == 0) {\n        am->in_matrix_channels = 0;\n        return;\n    }\n    for (i = 0; i < FFMIN(am->in_channels, am->out_channels); i++) {\n        int skip = 1;\n        for (o = 0; o < am->out_channels; o++) {\n            int i0;\n            if ((o != i && matrix[o * stride + i] != 0.0) ||\n                (o == i && matrix[o * stride + i] != 1.0)) {\n                skip = 0;\n                break;\n            }\n            if (o == i) {\n                for (i0 = 0; i0 < am->in_channels; i0++) {\n                    if (i0 != i && matrix[o * stride + i0] != 0.0) {\n                        skip = 0;\n                        break;\n                    }\n                }\n            }\n        }\n        if (skip) {\n            am->input_skip[i] = 1;\n            am->in_matrix_channels--;\n        }\n    }\n    for (; i < am->in_channels; i++) {\n        int contrib = 0;\n        for (o = 0; o < am->out_channels; o++) {\n            if (matrix[o * stride + i] != 0.0) {\n                contrib = 1;\n                break;\n            }\n        }\n        if (!contrib) {\n            am->input_skip[i] = 1;\n            am->in_matrix_channels--;\n        }\n    }\n    if (am->in_matrix_channels == 0) {\n        am->out_matrix_channels = 0;\n        return;\n    }\n    for (o = 0; o < FFMIN(am->in_channels, am->out_channels); o++) {\n        int skip = 1;\n        int o0;\n        for (i = 0; i < am->in_channels; i++) {\n            if ((o != i && matrix[o * stride + i] != 0.0) ||\n                (o == i && matrix[o * stride + i] != 1.0)) {\n                skip = 0;\n                break;\n            }\n        }\n        i = o;\n        for (o0 = 0; o0 < am->out_channels; o0++) {\n            if (o0 != i && matrix[o0 * stride + i] != 0.0) {\n                skip = 0;\n                break;\n            }\n        }\n        if (skip) {\n            am->output_skip[o] = 1;\n            am->out_matrix_channels--;\n        }\n    }\n    if (am->out_matrix_channels == 0) {\n        am->in_matrix_channels = 0;\n        return;\n    }\n}']