Skip to content
Permalink
Browse files

#1199

  • Loading branch information...
Cristy
Cristy committed Jul 5, 2018
1 parent c7537dd commit 6b6bff054d569a77973f2140c0e86366e6168a6c
Showing with 11 additions and 7 deletions.
  1. +2 −1 coders/cals.c
  2. +5 −4 coders/dcm.c
  3. +2 −1 coders/pict.c
  4. +2 −1 coders/pwp.c
@@ -257,7 +257,8 @@ static Image *ReadCALSImage(const ImageInfo *image_info,
if ((unique_file == -1) || (file == (FILE *) NULL))
ThrowImageException(FileOpenError,"UnableToCreateTemporaryFile");
while ((c=ReadBlobByte(image)) != EOF)
(void) fputc(c,file);
if (fputc(c,file) != c)
break;
(void) fclose(file);
(void) CloseBlob(image);
image=DestroyImage(image);
@@ -3228,13 +3228,13 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
(strncmp(implicit_vr,"SS",2) == 0) ||
(strncmp(implicit_vr,"US",2) == 0))
quantum=2;
else
else
if ((strncmp(implicit_vr,"FL",2) == 0) ||
(strncmp(implicit_vr,"OF",2) == 0) ||
(strncmp(implicit_vr,"SL",2) == 0) ||
(strncmp(implicit_vr,"UL",2) == 0))
quantum=4;
else
else
if (strncmp(implicit_vr,"FD",2) == 0)
quantum=8;
else
@@ -3880,7 +3880,8 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
"UnexpectedEndOfFile",image->filename);
break;
}
(void) fputc(c,file);
if (fputc(c,file) != c)
break;
}
(void) fclose(file);
if (c == EOF)
@@ -3934,7 +3935,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
length=(size_t) (GetQuantumRange(info.depth)+1);
if (length > (size_t) GetBlobSize(image))
ThrowDCMException(CorruptImageError,"InsufficientImageDataInFile");
if (info.scale != (Quantum *) NULL)
if (info.scale != (Quantum *) NULL)
info.scale=(Quantum *) RelinquishMagickMemory(info.scale);
info.scale=(Quantum *) AcquireQuantumMemory(MagickMax(length,256),
sizeof(*info.scale));
@@ -1472,7 +1472,8 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
c=ReadBlobByte(image);
if (c == EOF)
break;
(void) fputc(c,file);
if (fputc(c,file) != c)
break;
}
}
(void) fclose(file);
@@ -233,7 +233,8 @@ static Image *ReadPWPImage(const ImageInfo *image_info,ExceptionInfo *exception)
c=ReadBlobByte(pwp_image);
if (c == EOF)
break;
(void) fputc(c,file);
if (fputc(c,file) != c)
break;
}
(void) fclose(file);
if (c == EOF)

0 comments on commit 6b6bff0

Please sign in to comment.
You can’t perform that action at this time.