libavcodec/cinepakenc.c:649: error: Buffer Overrun L3
  Offset: [-1, +oo] (⇐ -1 + [0, +oo]) Size: 5 by call to `quantize`.

libavcodec/cinepakenc.c:649:9: Call
647.     for(v1_size = 1; v1_size <= 256; v1_size <<= 2) {
648.         //compute V1 codebook
649.         quantize(s, h, pict, 1, v1_size, -1, &info);
             ^
650. 
651.         for(v4_size = 0, v4 = -1; v4_size <= v1_size; v4_size = v4_size ? v4_size << 2 : v1_size >= 4 ? v1_size >> 2 : 1, v4++) {

libavcodec/cinepakenc.c:509:1: Parameter `v4`
  507. }
  508. 
  509. static int quantize(CinepakEncContext *s, int h, AVPicture *pict, int v1mode, int size, int v4, strip_info *info)
       ^
  510. {
  511.     int x, y, i, j, k, x2, y2, x3, y3, plane, shift;

libavcodec/cinepakenc.c:590:17: Call
  588. 
  589.                 //fill in vq_pict with V4 data
  590.                 decode_v4_vector(s, &vq_pict, mb->v4_vector[v4], info);
                       ^
  591. 
  592.                 mb->v4_error[v4] = compute_mb_distortion(s, &sub_pict, &vq_pict);

libavcodec/cinepakenc.c:335:35: <Offset trace>
333. 
334.     for(i = y = 0; y < 4; y += 2) {
335.         for(x = 0; x < 4; x += 2, i++) {
                                       ^
336.             sub_pict->data[0][x   +     y*sub_pict->linesize[0]] = info->v4_codebook[v4_vector[i]*entry_size];
337.             sub_pict->data[0][x+1 +     y*sub_pict->linesize[0]] = info->v4_codebook[v4_vector[i]*entry_size+1];

libavcodec/cinepakenc.c:335:35: Assignment
    333. 
    334.     for(i = y = 0; y < 4; y += 2) {
    335.         for(x = 0; x < 4; x += 2, i++) {
                                           ^
    336.             sub_pict->data[0][x   +     y*sub_pict->linesize[0]] = info->v4_codebook[v4_vector[i]*entry_size];
    337.             sub_pict->data[0][x+1 +     y*sub_pict->linesize[0]] = info->v4_codebook[v4_vector[i]*entry_size+1];

libavcodec/cinepakenc.c:330:1: <Length trace>
328. 
329. //decodes the V4 vectors in mb into the 4x4 MB pointed to by sub_pict
330. static void decode_v4_vector(CinepakEncContext *s, AVPicture *sub_pict, int *v4_vector, strip_info *info)
     ^
331. {
332.     int i, x, y, entry_size = s->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;

libavcodec/cinepakenc.c:330:1: Parameter `*v4_vector`
    328. 
    329. //decodes the V4 vectors in mb into the 4x4 MB pointed to by sub_pict
    330. static void decode_v4_vector(CinepakEncContext *s, AVPicture *sub_pict, int *v4_vector, strip_info *info)
         ^
    331. {
    332.     int i, x, y, entry_size = s->pix_fmt == AV_PIX_FMT_YUV420P ? 6 : 4;

libavcodec/cinepakenc.c:336:86: Array access: Offset: [-1, +oo] (⇐ -1 + [0, +oo]) Size: 5 by call to `quantize` 
    334.     for(i = y = 0; y < 4; y += 2) {
    335.         for(x = 0; x < 4; x += 2, i++) {
    336.             sub_pict->data[0][x   +     y*sub_pict->linesize[0]] = info->v4_codebook[v4_vector[i]*entry_size];
                                                                                              ^
    337.             sub_pict->data[0][x+1 +     y*sub_pict->linesize[0]] = info->v4_codebook[v4_vector[i]*entry_size+1];
    338.             sub_pict->data[0][x   + (y+1)*sub_pict->linesize[0]] = info->v4_codebook[v4_vector[i]*entry_size+2];
