Skip to content

Commit

Permalink
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33350
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Apr 17, 2021
1 parent 270494f commit 0eccd35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion coders/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static Image *ReadMAPImage(const ImageInfo *image_info,ExceptionInfo *exception)
packet_size=(size_t) (depth/8);
pixels=(unsigned char *) AcquireQuantumMemory(image->columns,packet_size*
sizeof(*pixels));
packet_size=(size_t) (image->colors > 256 ? 6UL : 3UL);
packet_size=(size_t) (depth > 8 ? 6UL : 3UL);
colormap=(unsigned char *) AcquireQuantumMemory(image->colors,packet_size*
sizeof(*colormap));
if ((pixels == (unsigned char *) NULL) ||
Expand Down
13 changes: 7 additions & 6 deletions magick/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -5454,16 +5454,17 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image,
(void) CopyMagickString(clone_info->filename,primitive_info->text,
MagickPathExtent);
status&=SetImageInfo(clone_info,0,exception);
if ((LocaleNCompare(clone_info->magick,"http",4) == 0) ||
(LocaleCompare(clone_info->magick,"mpri") == 0) ||
(LocaleCompare(clone_info->magick,"*") == 0))
(void) CopyMagickString(clone_info->filename,primitive_info->text,
MagickPathExtent);
(void) CopyMagickString(clone_info->filename,primitive_info->text,
MagickPathExtent);
if (clone_info->size != (char *) NULL)
clone_info->size=DestroyString(clone_info->size);
if (clone_info->extract != (char *) NULL)
clone_info->extract=DestroyString(clone_info->extract);
if (*clone_info->filename != '\0')
if ((LocaleCompare(clone_info->magick,"file") == 0) ||
(LocaleCompare(clone_info->magick,"https") == 0) ||
(LocaleCompare(clone_info->magick,"http") == 0) ||
(LocaleCompare(clone_info->magick,"mpri") == 0) ||
(IsPathAccessible(clone_info->filename) != MagickFalse))
composite_images=ReadImage(clone_info,exception);
}
clone_info=DestroyImageInfo(clone_info);
Expand Down

0 comments on commit 0eccd35

Please sign in to comment.