libavcodec/h264.c:695: error: Buffer Overrun L2
  Offset: [0, 52] (⇐ [0, 1] + [0, 51]) Size: 2.

libavcodec/h264.c:691:13: <Offset trace>
689.         }
690. 
691.         for(q=0; q<52; q++){
                 ^
692.             int shift = div6[q];
693.             int idx = rem6[q];

libavcodec/h264.c:691:13: Assignment
689.         }
690. 
691.         for(q=0; q<52; q++){
                 ^
692.             int shift = div6[q];
693.             int idx = rem6[q];

libavcodec/h264.c:679:1: <Length trace>
677. }
678. 
679. static void init_dequant8_coeff_table(H264Context *h){
     ^
680.     int i,q,x;
681.     const int transpose = (h->h264dsp.h264_idct8_add != ff_h264_idct8_add_c); //FIXME ugly

libavcodec/h264.c:679:1: Parameter `*h->dequant8_coeff[*]`
677. }
678. 
679. static void init_dequant8_coeff_table(H264Context *h){
     ^
680.     int i,q,x;
681.     const int transpose = (h->h264dsp.h264_idct8_add != ff_h264_idct8_add_c); //FIXME ugly

libavcodec/h264.c:695:17: Array access: Offset: [0, 52] (⇐ [0, 1] + [0, 51]) Size: 2
693.             int idx = rem6[q];
694.             for(x=0; x<64; x++)
695.                 h->dequant8_coeff[i][q][transpose ? (x>>3)|((x&7)<<3) : x] =
                     ^
696.                     ((uint32_t)dequant8_coeff_init[idx][ dequant8_coeff_init_scan[((x>>1)&12) | (x&3)] ] *
697.                     h->pps.scaling_matrix8[i][x]) << shift;

static void init_dequant8_coeff_table(H264Context *h){
    int i,q,x;
    const int transpose = (h->h264dsp.h264_idct8_add != ff_h264_idct8_add_c);
    h->dequant8_coeff[0] = h->dequant8_buffer[0];
    h->dequant8_coeff[1] = h->dequant8_buffer[1];
    for(i=0; i<2; i++ ){
        if(i && !memcmp(h->pps.scaling_matrix8[0], h->pps.scaling_matrix8[1], 64*sizeof(uint8_t))){
            h->dequant8_coeff[1] = h->dequant8_buffer[0];
            break;
        }
        for(q=0; q<52; q++){
            int shift = div6[q];
            int idx = rem6[q];
            for(x=0; x<64; x++)
                h->dequant8_coeff[i][q][transpose ? (x>>3)|((x&7)<<3) : x] =
                    ((uint32_t)dequant8_coeff_init[idx][ dequant8_coeff_init_scan[((x>>1)&12) | (x&3)] ] *
                    h->pps.scaling_matrix8[i][x]) << shift;
        }
    }
}
['static void init_dequant8_coeff_table(H264Context *h){\n    int i,q,x;\n    const int transpose = (h->h264dsp.h264_idct8_add != ff_h264_idct8_add_c);\n    h->dequant8_coeff[0] = h->dequant8_buffer[0];\n    h->dequant8_coeff[1] = h->dequant8_buffer[1];\n    for(i=0; i<2; i++ ){\n        if(i && !memcmp(h->pps.scaling_matrix8[0], h->pps.scaling_matrix8[1], 64*sizeof(uint8_t))){\n            h->dequant8_coeff[1] = h->dequant8_buffer[0];\n            break;\n        }\n        for(q=0; q<52; q++){\n            int shift = div6[q];\n            int idx = rem6[q];\n            for(x=0; x<64; x++)\n                h->dequant8_coeff[i][q][transpose ? (x>>3)|((x&7)<<3) : x] =\n                    ((uint32_t)dequant8_coeff_init[idx][ dequant8_coeff_init_scan[((x>>1)&12) | (x&3)] ] *\n                    h->pps.scaling_matrix8[i][x]) << shift;\n        }\n    }\n}']