Skip to content

Commit

Permalink
improve exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Sep 15, 2023
1 parent fe40221 commit 3b04052
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion coders/dcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -4114,7 +4114,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
if (colors == 0)
colors=one << info.depth;
if (AcquireImageColormap(image,colors) == MagickFalse)
ThrowDCMException(ResourceLimitError,"MemoryAllocationFailed");
ThrowDCMException(ResourceLimitError,"UnableToCreateColormap");
if (redmap != (int *) NULL)
for (i=0; i < (ssize_t) colors; i++)
{
Expand Down
2 changes: 1 addition & 1 deletion magick/colormap.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ MagickExport MagickBooleanType AcquireImageColormap(Image *image,
{
image->colors=0;
image->storage_class=DirectClass;
ThrowBinaryImageException(ResourceLimitError,"MemoryAllocationFailed",
ThrowBinaryImageException(ResourceLimitError,"UnableToCreateColormap",
image->filename);
}
image->colors=MagickMax(colors,1);
Expand Down

0 comments on commit 3b04052

Please sign in to comment.