From: Cristy Date: Sun, 28 May 2017 11:10:01 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.5-9~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=785c636413563878e4dd2bb38ad86dc43841cd17;p=imagemagick ... --- diff --git a/ChangeLog b/ChangeLog index 7af881acf..f7c95fd7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-05-28 7.0.5-9 Cristy + * Transient error validating the JPEG-2000 image format (reference + https://github.com/ImageMagick/ImageMagick/issues/501). + * Properly allocate DCM image colormap (reference + https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=32063). + 2017-05-26 7.0.5-8 Cristy * Release ImageMagick version 7.0.5-8, GIT revision 20099:870a016:20170526. diff --git a/coders/dcm.c b/coders/dcm.c index 02f3854e5..f1be260dc 100644 --- a/coders/dcm.c +++ b/coders/dcm.c @@ -2892,7 +2892,7 @@ static MagickBooleanType ReadDCMPixels(Image *image,DCMInfo *info, double window_max, window_min; - + window_min=ceil(info->window_center- (info->window_width-1.0)/2.0-0.5); window_max=floor(info->window_center+ @@ -3526,7 +3526,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception) Rescale intercept */ if (data != (unsigned char *) NULL) - info.rescale_intercept=StringToDouble((char *) data, + info.rescale_intercept=StringToDouble((char *) data, (char **) NULL); break; } @@ -3935,7 +3935,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception) one=1; if (colors == 0) colors=one << info.depth; - if (AcquireImageColormap(image,one << info.depth,exception) == MagickFalse) + if (AcquireImageColormap(image,colors,exception) == MagickFalse) ThrowDCMException(ResourceLimitError,"MemoryAllocationFailed"); if (redmap != (int *) NULL) for (i=0; i < (ssize_t) colors; i++)