libavcodec/ffv1.c:787: error: Buffer Overrun L1
  Offset: [3, `w` + 3] Size: 2 by call to `decode_line`.

libavcodec/ffv1.c:768:1: Parameter `w`
766. }
767. 
768. static void decode_plane(FFV1Context *s, uint8_t *src, int w, int h, int stride, int plane_index){
     ^
769.     int x, y;
770.     int_fast16_t sample_buffer[2][w+6];

libavcodec/ffv1.c:787:9: Call
785. 
786. //{START_TIMER
787.         decode_line(s, w, sample, plane_index, 8);
             ^
788.         for(x=0; x<w; x++){
789.             src[x + stride*y]= sample[1][x];

libavcodec/ffv1.c:711:1: Parameter `w`
  709. }
  710. 
  711. static inline void decode_line(FFV1Context *s, int w, int_fast16_t *sample[2], int plane_index, int bits){
       ^
  712.     PlaneContext * const p= &s->plane[plane_index];
  713.     RangeCoder * const c= &s->c;

libavcodec/ffv1.c:722:18: Call
  720.         int diff, context, sign;
  721. 
  722.         context= get_context(s, sample[1] + x, sample[0] + x, sample[1] + x);
                        ^
  723.         if(context < 0){
  724.             context= -context;

libavcodec/ffv1.c:207:1: <Length trace>
205. }
206. 
207. static inline int get_context(FFV1Context *f, int_fast16_t *src, int_fast16_t *last, int_fast16_t *last2){
     ^
208.     const int LT= last[-1];
209.     const int  T= last[ 0];

libavcodec/ffv1.c:207:1: Parameter `*last2`
    205. }
    206. 
    207. static inline int get_context(FFV1Context *f, int_fast16_t *src, int_fast16_t *last, int_fast16_t *last2){
         ^
    208.     const int LT= last[-1];
    209.     const int  T= last[ 0];

libavcodec/ffv1.c:214:23: Array access: Offset: [3, w + 3] Size: 2 by call to `decode_line` 
    212. 
    213.     if(f->quant_table[3][127]){
    214.         const int TT= last2[0];
                               ^
    215.         const int LL=  src[-2];
    216.         return f->quant_table[0][(L-LT) & 0xFF] + f->quant_table[1][(LT-T) & 0xFF] + f->quant_table[2][(T-RT) & 0xFF]

static inline int get_context(FFV1Context *f, int_fast16_t *src, int_fast16_t *last, int_fast16_t *last2){
    const int LT= last[-1];
    const int  T= last[ 0];
    const int RT= last[ 1];
    const int L =  src[-1];
    if(f->quant_table[3][127]){
        const int TT= last2[0];
        const int LL=  src[-2];
        return f->quant_table[0][(L-LT) & 0xFF] + f->quant_table[1][(LT-T) & 0xFF] + f->quant_table[2][(T-RT) & 0xFF]
              +f->quant_table[3][(LL-L) & 0xFF] + f->quant_table[4][(TT-T) & 0xFF];
    }else
        return f->quant_table[0][(L-LT) & 0xFF] + f->quant_table[1][(LT-T) & 0xFF] + f->quant_table[2][(T-RT) & 0xFF];
}
['static void decode_plane(FFV1Context *s, uint8_t *src, int w, int h, int stride, int plane_index){\n    int x, y;\n    int_fast16_t sample_buffer[2][w+6];\n    int_fast16_t *sample[2]= {sample_buffer[0]+3, sample_buffer[1]+3};\n    s->run_index=0;\n    memset(sample_buffer, 0, sizeof(sample_buffer));\n    for(y=0; y<h; y++){\n        int_fast16_t *temp= sample[0];\n        sample[0]= sample[1];\n        sample[1]= temp;\n        sample[1][-1]= sample[0][0  ];\n        sample[0][ w]= sample[0][w-1];\n        decode_line(s, w, sample, plane_index, 8);\n        for(x=0; x<w; x++){\n            src[x + stride*y]= sample[1][x];\n        }\n    }\n}', 'static inline void decode_line(FFV1Context *s, int w, int_fast16_t *sample[2], int plane_index, int bits){\n    PlaneContext * const p= &s->plane[plane_index];\n    RangeCoder * const c= &s->c;\n    int x;\n    int run_count=0;\n    int run_mode=0;\n    int run_index= s->run_index;\n    for(x=0; x<w; x++){\n        int diff, context, sign;\n        context= get_context(s, sample[1] + x, sample[0] + x, sample[1] + x);\n        if(context < 0){\n            context= -context;\n            sign=1;\n        }else\n            sign=0;\n        if(s->ac){\n            diff= get_symbol(c, p->state[context], 1);\n        }else{\n            if(context == 0 && run_mode==0) run_mode=1;\n            if(run_mode){\n                if(run_count==0 && run_mode==1){\n                    if(get_bits1(&s->gb)){\n                        run_count = 1<<log2_run[run_index];\n                        if(x + run_count <= w) run_index++;\n                    }else{\n                        if(log2_run[run_index]) run_count = get_bits(&s->gb, log2_run[run_index]);\n                        else run_count=0;\n                        if(run_index) run_index--;\n                        run_mode=2;\n                    }\n                }\n                run_count--;\n                if(run_count < 0){\n                    run_mode=0;\n                    run_count=0;\n                    diff= get_vlc_symbol(&s->gb, &p->vlc_state[context], bits);\n                    if(diff>=0) diff++;\n                }else\n                    diff=0;\n            }else\n                diff= get_vlc_symbol(&s->gb, &p->vlc_state[context], bits);\n        }\n        if(sign) diff= -diff;\n        sample[1][x]= (predict(sample[1] + x, sample[0] + x) + diff) & ((1<<bits)-1);\n    }\n    s->run_index= run_index;\n}', 'static inline int get_context(FFV1Context *f, int_fast16_t *src, int_fast16_t *last, int_fast16_t *last2){\n    const int LT= last[-1];\n    const int  T= last[ 0];\n    const int RT= last[ 1];\n    const int L =  src[-1];\n    if(f->quant_table[3][127]){\n        const int TT= last2[0];\n        const int LL=  src[-2];\n        return f->quant_table[0][(L-LT) & 0xFF] + f->quant_table[1][(LT-T) & 0xFF] + f->quant_table[2][(T-RT) & 0xFF]\n              +f->quant_table[3][(LL-L) & 0xFF] + f->quant_table[4][(TT-T) & 0xFF];\n    }else\n        return f->quant_table[0][(L-LT) & 0xFF] + f->quant_table[1][(LT-T) & 0xFF] + f->quant_table[2][(T-RT) & 0xFF];\n}']