]> Creatis software - gdcm.git/blobdiff - src/gdcmmpeg2/src/mpeg2enc/readpic.c
avoid segfault when unaware user sets SplitOnly to true, and the asks for ImageDataVector
[gdcm.git] / src / gdcmmpeg2 / src / mpeg2enc / readpic.c
index 3ce6d65c00db495b7ec1a5fa2781f236dd85665b..2549d5e2aa241fedc226b3cf8d40b6f9153d8606 100644 (file)
@@ -41,7 +41,7 @@ static void border_extend _ANSI_ARGS_((unsigned char *frame, int w1, int h1,
 static void conv444to422 _ANSI_ARGS_((unsigned char *src, unsigned char *dst));
 static void conv422to420 _ANSI_ARGS_((unsigned char *src, unsigned char *dst));
 
-int pbm_getint(FILE *file); //forward declaration
+int pbm_getint(FILE *file); /*forward declaration */
 
 void readframe(fname,frame)
 char *fname;
@@ -303,7 +303,7 @@ unsigned char *src, *dst;
         ip3 = (i<width-3) ? i+3 : width-1;
         ip4 = (i<width-4) ? i+4 : width-1;
         ip5 = (i<width-5) ? i+5 : width-1;
-        ip6 = (i<width-5) ? i+6 : width-1;
+        ip6 = (i<width-6) ? i+6 : width-1;
 
         /* FIR filter with 0.5 sample interval phase shift */
         dst[i>>1] = clp[(int)(228*(src[i]+src[ip1])