From 386ad9be33d78cb8af6795ffc460b5bebcf5104c Mon Sep 17 00:00:00 2001 From: cristy Date: Fri, 19 Mar 2010 23:46:32 +0000 Subject: [PATCH] --- ChangeLog | 1 + coders/dcm.c | 4 +--- magick/image.c | 2 +- magick/token-private.h | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index f588c609b..80c31f406 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2010-03-18 6.6.0-8 Cristy * The animate program no longer loops twice when -loop 1 is specified. + * The caption format would sometimes hang when the text was not UTF-8. 2010-03-17 6.6.0-7 Cristy * Detect CMYKProcessColor AI tag. diff --git a/coders/dcm.c b/coders/dcm.c index 2ee62fdae..a6730ce45 100644 --- a/coders/dcm.c +++ b/coders/dcm.c @@ -3654,7 +3654,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception) if ((image->colormap == (PixelPacket *) NULL) && (samples_per_pixel == 1)) { if (colors == 0) - colors=MagickMin(1UL << image->depth,MaxColormapSize); + colors=1UL << image->depth; if (AcquireImageColormap(image,colors) == MagickFalse) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); if (redmap != (int *) NULL) @@ -3848,8 +3848,6 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception) 0.5)/(window_width-1))+0.5)); } index&=mask; - if ((scale != (Quantum *) NULL) && (index <= (int) max_value)) - index=(int) scale[index]; index=(int) ConstrainColormapIndex(image,(unsigned long) index); indexes[x]=(IndexPacket) index; pixel.red=1UL*image->colormap[index].red; diff --git a/magick/image.c b/magick/image.c index 902141161..585664799 100644 --- a/magick/image.c +++ b/magick/image.c @@ -322,7 +322,7 @@ MagickExport MagickBooleanType AcquireImageColormap(Image *image, assert(image->signature == MagickSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); - image->colors=MagickMin(colors,MaxColormapSize); + image->colors=colors; length=(size_t) colors; if (image->colormap == (PixelPacket *) NULL) image->colormap=(PixelPacket *) AcquireQuantumMemory(length, diff --git a/magick/token-private.h b/magick/token-private.h index a13181a16..bd8b5fe0b 100644 --- a/magick/token-private.h +++ b/magick/token-private.h @@ -60,7 +60,7 @@ static inline long GetNextUTFCode(const char *text,size_t *octets) c, unicode; - *octets=0; + *octets=1; if (text == (const char *) NULL) { errno=EINVAL; -- 2.40.0