libavcodec/snowenc.c:999: error: Buffer Overrun L1
  Offset: 2 Size: 2 by call to `check_block`.

libavcodec/snowenc.c:997:1: Array declaration
995. /* special case for int[2] args we discard afterwards,
996.  * fixes compilation problem with gcc 2.95 */
997. static av_always_inline int check_block_inter(SnowContext *s, int mb_x, int mb_y, int p0, int p1, uint8_t (*obmc_edged)[MB_SIZE * 2], int *best_rd){
     ^
998.     int p[2] = {p0, p1};
999.     return check_block(s, mb_x, mb_y, p, 0, obmc_edged, best_rd);

libavcodec/snowenc.c:999:12: Call
 997. static av_always_inline int check_block_inter(SnowContext *s, int mb_x, int mb_y, int p0, int p1, uint8_t (*obmc_edged)[MB_SIZE * 2], int *best_rd){
 998.     int p[2] = {p0, p1};
 999.     return check_block(s, mb_x, mb_y, p, 0, obmc_edged, best_rd);
                 ^
1000. }
1001. 

libavcodec/snowenc.c:956:1: <Length trace>
954. }
955. 
956. static av_always_inline int check_block(SnowContext *s, int mb_x, int mb_y, int p[3], int intra, uint8_t (*obmc_edged)[MB_SIZE * 2], int *best_rd){
     ^
957.     const int b_stride= s->b_width << s->block_max_depth;
958.     BlockNode *block= &s->block[mb_x + mb_y * b_stride];

libavcodec/snowenc.c:956:1: Parameter `*p`
  954. }
  955. 
  956. static av_always_inline int check_block(SnowContext *s, int mb_x, int mb_y, int p[3], int intra, uint8_t (*obmc_edged)[MB_SIZE * 2], int *best_rd){
       ^
  957.     const int b_stride= s->b_width << s->block_max_depth;
  958.     BlockNode *block= &s->block[mb_x + mb_y * b_stride];

libavcodec/snowenc.c:969:27: Array access: Offset: 2 Size: 2 by call to `check_block` 
  967.         block->color[0] = p[0];
  968.         block->color[1] = p[1];
  969.         block->color[2] = p[2];
                                 ^
  970.         block->type |= BLOCK_INTRA;
  971.     }else{

static av_always_inline int check_block(SnowContext *s, int mb_x, int mb_y, int p[3], int intra, uint8_t (*obmc_edged)[MB_SIZE * 2], int *best_rd){
    const int b_stride= s->b_width << s->block_max_depth;
    BlockNode *block= &s->block[mb_x + mb_y * b_stride];
    BlockNode backup= *block;
    unsigned value;
    int rd, index;
    assert(mb_x>=0 && mb_y>=0);
    assert(mb_x<b_stride);
    if(intra){
        block->color[0] = p[0];
        block->color[1] = p[1];
        block->color[2] = p[2];
        block->type |= BLOCK_INTRA;
    }else{
        index= (p[0] + 31*p[1]) & (ME_CACHE_SIZE-1);
        value= s->me_cache_generation + (p[0]>>10) + (p[1]<<6) + (block->ref<<12);
        if(s->me_cache[index] == value)
            return 0;
        s->me_cache[index]= value;
        block->mx= p[0];
        block->my= p[1];
        block->type &= ~BLOCK_INTRA;
    }
    rd= get_block_rd(s, mb_x, mb_y, 0, obmc_edged);
    if(rd < *best_rd){
        *best_rd= rd;
        return 1;
    }else{
        *block= backup;
        return 0;
    }
}
['static av_always_inline int check_block_inter(SnowContext *s, int mb_x, int mb_y, int p0, int p1, uint8_t (*obmc_edged)[MB_SIZE * 2], int *best_rd){\n    int p[2] = {p0, p1};\n    return check_block(s, mb_x, mb_y, p, 0, obmc_edged, best_rd);\n}', 'static av_always_inline int check_block(SnowContext *s, int mb_x, int mb_y, int p[3], int intra, uint8_t (*obmc_edged)[MB_SIZE * 2], int *best_rd){\n    const int b_stride= s->b_width << s->block_max_depth;\n    BlockNode *block= &s->block[mb_x + mb_y * b_stride];\n    BlockNode backup= *block;\n    unsigned value;\n    int rd, index;\n    assert(mb_x>=0 && mb_y>=0);\n    assert(mb_x<b_stride);\n    if(intra){\n        block->color[0] = p[0];\n        block->color[1] = p[1];\n        block->color[2] = p[2];\n        block->type |= BLOCK_INTRA;\n    }else{\n        index= (p[0] + 31*p[1]) & (ME_CACHE_SIZE-1);\n        value= s->me_cache_generation + (p[0]>>10) + (p[1]<<6) + (block->ref<<12);\n        if(s->me_cache[index] == value)\n            return 0;\n        s->me_cache[index]= value;\n        block->mx= p[0];\n        block->my= p[1];\n        block->type &= ~BLOCK_INTRA;\n    }\n    rd= get_block_rd(s, mb_x, mb_y, 0, obmc_edged);\n    if(rd < *best_rd){\n        *best_rd= rd;\n        return 1;\n    }else{\n        *block= backup;\n        return 0;\n    }\n}']