libavcodec/wmv2.c:81: error: Buffer Overrun L2
  Offset: [5, 61] (⇐ [3, 59] + 2) Size: 6 by call to `wmv2_add_block`.

libavcodec/wmv2.c:81:5: Call
79.     wmv2_add_block(w, block1[1], dest_y + 8                , s->linesize, 1);
80.     wmv2_add_block(w, block1[2], dest_y +     8*s->linesize, s->linesize, 2);
81.     wmv2_add_block(w, block1[3], dest_y + 8 + 8*s->linesize, s->linesize, 3);
        ^
82. 
83.     if(s->flags&CODEC_FLAG_GRAY) return;

libavcodec/wmv2.c:51:1: Parameter `n`
  49. }
  50. 
  51. static void wmv2_add_block(Wmv2Context *w, int16_t *block1, uint8_t *dst, int stride, int n){
      ^
  52.     MpegEncContext * const s= &w->s;
  53. 

libavcodec/wmv2.c:66:9: Call
  64.     case 2:
  65.         ff_simple_idct48_add(dst           , stride, block1);
  66.         ff_simple_idct48_add(dst + 4       , stride, w->abt_block2[n]);
              ^
  67.         s->dsp.clear_block(w->abt_block2[n]);
  68.         break;

libavcodec/simple_idct.c:192:1: Parameter `*block`
    190. }
    191. 
    192. void ff_simple_idct48_add(uint8_t *dest, int line_size, int16_t *block)
         ^
    193. {
    194.     int i;

libavcodec/simple_idct.c:198:9: Call
    196.     /* IDCT4 on each line */
    197.     for(i=0; i<8; i++) {
    198.         idct4row(block + i*8);
                 ^
    199.     }
    200. 

libavcodec/simple_idct.c:159:1: <Length trace>
157. #define R3 R_FIX(0.5)
158. #define R_SHIFT 11
159. static inline void idct4row(int16_t *row)
     ^
160. {
161.     int c0, c1, c2, c3, a0, a1, a2, a3;

libavcodec/simple_idct.c:159:1: Parameter `*row`
      157. #define R3 R_FIX(0.5)
      158. #define R_SHIFT 11
      159. static inline void idct4row(int16_t *row)
           ^
      160. {
      161.     int c0, c1, c2, c3, a0, a1, a2, a3;

libavcodec/simple_idct.c:165:10: Array access: Offset: [5, 61] (⇐ [3, 59] + 2) Size: 6 by call to `wmv2_add_block` 
      163.     a0 = row[0];
      164.     a1 = row[1];
      165.     a2 = row[2];
                    ^
      166.     a3 = row[3];
      167.     c0 = (a0 + a2)*R3 + (1 << (R_SHIFT - 1));

static inline void idct4row(int16_t *row)
{
    int c0, c1, c2, c3, a0, a1, a2, a3;
    a0 = row[0];
    a1 = row[1];
    a2 = row[2];
    a3 = row[3];
    c0 = (a0 + a2)*R3 + (1 << (R_SHIFT - 1));
    c2 = (a0 - a2)*R3 + (1 << (R_SHIFT - 1));
    c1 = a1 * R1 + a3 * R2;
    c3 = a1 * R2 - a3 * R1;
    row[0]= (c0 + c1) >> R_SHIFT;
    row[1]= (c2 + c3) >> R_SHIFT;
    row[2]= (c2 - c3) >> R_SHIFT;
    row[3]= (c0 - c1) >> R_SHIFT;
}
['void ff_wmv2_add_mb(MpegEncContext *s, int16_t block1[6][64], uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr){\n    Wmv2Context * const w= (Wmv2Context*)s;\n    wmv2_add_block(w, block1[0], dest_y                    , s->linesize, 0);\n    wmv2_add_block(w, block1[1], dest_y + 8                , s->linesize, 1);\n    wmv2_add_block(w, block1[2], dest_y +     8*s->linesize, s->linesize, 2);\n    wmv2_add_block(w, block1[3], dest_y + 8 + 8*s->linesize, s->linesize, 3);\n    if(s->flags&CODEC_FLAG_GRAY) return;\n    wmv2_add_block(w, block1[4], dest_cb                   , s->uvlinesize, 4);\n    wmv2_add_block(w, block1[5], dest_cr                   , s->uvlinesize, 5);\n}', 'static void wmv2_add_block(Wmv2Context *w, int16_t *block1, uint8_t *dst, int stride, int n){\n    MpegEncContext * const s= &w->s;\n  if (s->block_last_index[n] >= 0) {\n    switch(w->abt_type_table[n]){\n    case 0:\n        w->wdsp.idct_add(dst, stride, block1);\n        break;\n    case 1:\n        ff_simple_idct84_add(dst           , stride, block1);\n        ff_simple_idct84_add(dst + 4*stride, stride, w->abt_block2[n]);\n        s->dsp.clear_block(w->abt_block2[n]);\n        break;\n    case 2:\n        ff_simple_idct48_add(dst           , stride, block1);\n        ff_simple_idct48_add(dst + 4       , stride, w->abt_block2[n]);\n        s->dsp.clear_block(w->abt_block2[n]);\n        break;\n    default:\n        av_log(s->avctx, AV_LOG_ERROR, "internal error in WMV2 abt\\n");\n    }\n  }\n}', 'void ff_simple_idct48_add(uint8_t *dest, int line_size, int16_t *block)\n{\n    int i;\n    for(i=0; i<8; i++) {\n        idct4row(block + i*8);\n    }\n    for(i=0; i<4; i++){\n        idctSparseColAdd_8(dest + i, line_size, block + i);\n    }\n}', 'static inline void idct4row(int16_t *row)\n{\n    int c0, c1, c2, c3, a0, a1, a2, a3;\n    a0 = row[0];\n    a1 = row[1];\n    a2 = row[2];\n    a3 = row[3];\n    c0 = (a0 + a2)*R3 + (1 << (R_SHIFT - 1));\n    c2 = (a0 - a2)*R3 + (1 << (R_SHIFT - 1));\n    c1 = a1 * R1 + a3 * R2;\n    c3 = a1 * R2 - a3 * R1;\n    row[0]= (c0 + c1) >> R_SHIFT;\n    row[1]= (c2 + c3) >> R_SHIFT;\n    row[2]= (c2 - c3) >> R_SHIFT;\n    row[3]= (c0 - c1) >> R_SHIFT;\n}']