libavcodec/aacenc.c:231: error: Buffer Overrun L1
  Offset: [1024, 2047] Size: 1024.

libavcodec/aacenc.c:230:18: <Offset trace>
228.         if (sce->ics.window_sequence[0] != LONG_START_SEQUENCE) {
229.             j = channel;
230.             for (i = 0; i < 1024; i++, j += avctx->channels) {
                      ^
231.                 s->output[i+1024]         = audio[j] * lwindow[1024 - i - 1];
232.                 sce->saved[i] = audio[j] * lwindow[i];

libavcodec/aacenc.c:230:18: Assignment
228.         if (sce->ics.window_sequence[0] != LONG_START_SEQUENCE) {
229.             j = channel;
230.             for (i = 0; i < 1024; i++, j += avctx->channels) {
                      ^
231.                 s->output[i+1024]         = audio[j] * lwindow[1024 - i - 1];
232.                 sce->saved[i] = audio[j] * lwindow[i];

libavcodec/aacenc.c:211:1: <Length trace>
209. }
210. 
211. static void apply_window_and_mdct(AVCodecContext *avctx, AACEncContext *s,
     ^
212.                                   SingleChannelElement *sce, short *audio, int channel)
213. {

libavcodec/aacenc.c:211:1: Parameter `sce->saved[*]`
209. }
210. 
211. static void apply_window_and_mdct(AVCodecContext *avctx, AACEncContext *s,
     ^
212.                                   SingleChannelElement *sce, short *audio, int channel)
213. {

libavcodec/aacenc.c:231:17: Array access: Offset: [1024, 2047] Size: 1024
229.             j = channel;
230.             for (i = 0; i < 1024; i++, j += avctx->channels) {
231.                 s->output[i+1024]         = audio[j] * lwindow[1024 - i - 1];
                     ^
232.                 sce->saved[i] = audio[j] * lwindow[i];
233.             }

static void apply_window_and_mdct(AVCodecContext *avctx, AACEncContext *s,
                                  SingleChannelElement *sce, short *audio, int channel)
{
    int i, j, k;
    const float * lwindow = sce->ics.use_kb_window[0] ? ff_aac_kbd_long_1024 : ff_sine_1024;
    const float * swindow = sce->ics.use_kb_window[0] ? ff_aac_kbd_short_128 : ff_sine_128;
    const float * pwindow = sce->ics.use_kb_window[1] ? ff_aac_kbd_short_128 : ff_sine_128;
    if (sce->ics.window_sequence[0] != EIGHT_SHORT_SEQUENCE) {
        memcpy(s->output, sce->saved, sizeof(float)*1024);
        if (sce->ics.window_sequence[0] == LONG_STOP_SEQUENCE) {
            memset(s->output, 0, sizeof(s->output[0]) * 448);
            for (i = 448; i < 576; i++)
                s->output[i] = sce->saved[i] * pwindow[i - 448];
            for (i = 576; i < 704; i++)
                s->output[i] = sce->saved[i];
        }
        if (sce->ics.window_sequence[0] != LONG_START_SEQUENCE) {
            j = channel;
            for (i = 0; i < 1024; i++, j += avctx->channels) {
                s->output[i+1024]         = audio[j] * lwindow[1024 - i - 1];
                sce->saved[i] = audio[j] * lwindow[i];
            }
        } else {
            j = channel;
            for (i = 0; i < 448; i++, j += avctx->channels)
                s->output[i+1024]         = audio[j];
            for (i = 448; i < 576; i++, j += avctx->channels)
                s->output[i+1024]         = audio[j] * swindow[576 - i - 1];
            memset(s->output+1024+576, 0, sizeof(s->output[0]) * 448);
            j = channel;
            for (i = 0; i < 1024; i++, j += avctx->channels)
                sce->saved[i] = audio[j];
        }
        ff_mdct_calc(&s->mdct1024, sce->coeffs, s->output);
    } else {
        j = channel;
        for (k = 0; k < 1024; k += 128) {
            for (i = 448 + k; i < 448 + k + 256; i++)
                s->output[i - 448 - k] = (i < 1024)
                                         ? sce->saved[i]
                                         : audio[channel + (i-1024)*avctx->channels];
            s->dsp.vector_fmul        (s->output,     k ?  swindow : pwindow, 128);
            s->dsp.vector_fmul_reverse(s->output+128, s->output+128, swindow, 128);
            ff_mdct_calc(&s->mdct128, sce->coeffs + k, s->output);
        }
        j = channel;
        for (i = 0; i < 1024; i++, j += avctx->channels)
            sce->saved[i] = audio[j];
    }
}
['static void apply_window_and_mdct(AVCodecContext *avctx, AACEncContext *s,\n                                  SingleChannelElement *sce, short *audio, int channel)\n{\n    int i, j, k;\n    const float * lwindow = sce->ics.use_kb_window[0] ? ff_aac_kbd_long_1024 : ff_sine_1024;\n    const float * swindow = sce->ics.use_kb_window[0] ? ff_aac_kbd_short_128 : ff_sine_128;\n    const float * pwindow = sce->ics.use_kb_window[1] ? ff_aac_kbd_short_128 : ff_sine_128;\n    if (sce->ics.window_sequence[0] != EIGHT_SHORT_SEQUENCE) {\n        memcpy(s->output, sce->saved, sizeof(float)*1024);\n        if (sce->ics.window_sequence[0] == LONG_STOP_SEQUENCE) {\n            memset(s->output, 0, sizeof(s->output[0]) * 448);\n            for (i = 448; i < 576; i++)\n                s->output[i] = sce->saved[i] * pwindow[i - 448];\n            for (i = 576; i < 704; i++)\n                s->output[i] = sce->saved[i];\n        }\n        if (sce->ics.window_sequence[0] != LONG_START_SEQUENCE) {\n            j = channel;\n            for (i = 0; i < 1024; i++, j += avctx->channels) {\n                s->output[i+1024]         = audio[j] * lwindow[1024 - i - 1];\n                sce->saved[i] = audio[j] * lwindow[i];\n            }\n        } else {\n            j = channel;\n            for (i = 0; i < 448; i++, j += avctx->channels)\n                s->output[i+1024]         = audio[j];\n            for (i = 448; i < 576; i++, j += avctx->channels)\n                s->output[i+1024]         = audio[j] * swindow[576 - i - 1];\n            memset(s->output+1024+576, 0, sizeof(s->output[0]) * 448);\n            j = channel;\n            for (i = 0; i < 1024; i++, j += avctx->channels)\n                sce->saved[i] = audio[j];\n        }\n        ff_mdct_calc(&s->mdct1024, sce->coeffs, s->output);\n    } else {\n        j = channel;\n        for (k = 0; k < 1024; k += 128) {\n            for (i = 448 + k; i < 448 + k + 256; i++)\n                s->output[i - 448 - k] = (i < 1024)\n                                         ? sce->saved[i]\n                                         : audio[channel + (i-1024)*avctx->channels];\n            s->dsp.vector_fmul        (s->output,     k ?  swindow : pwindow, 128);\n            s->dsp.vector_fmul_reverse(s->output+128, s->output+128, swindow, 128);\n            ff_mdct_calc(&s->mdct128, sce->coeffs + k, s->output);\n        }\n        j = channel;\n        for (i = 0; i < 1024; i++, j += avctx->channels)\n            sce->saved[i] = audio[j];\n    }\n}']