Skip to content

Commit

Permalink
enforce one id per MIFF image
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Mar 23, 2022
1 parent 000557d commit 966a769
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
16 changes: 8 additions & 8 deletions MagickCore/property.c
Original file line number Diff line number Diff line change
Expand Up @@ -2972,10 +2972,10 @@ MagickExport const char *GetMagickProperty(ImageInfo *image_info,
if (convex_hull[n].y < extreme.y)
{
extreme=convex_hull[n];
continue;
continue;
}
if (convex_hull[n].y != extreme.y)
continue;
continue;
if (convex_hull[n].x < extreme.x)
extreme=convex_hull[n];
}
Expand All @@ -2988,10 +2988,10 @@ MagickExport const char *GetMagickProperty(ImageInfo *image_info,
if (convex_hull[n].x > extreme.x)
{
extreme=convex_hull[n];
continue;
continue;
}
if (convex_hull[n].x != extreme.x)
continue;
continue;
if (convex_hull[n].y < extreme.y)
extreme=convex_hull[n];
}
Expand All @@ -3004,10 +3004,10 @@ MagickExport const char *GetMagickProperty(ImageInfo *image_info,
if (convex_hull[n].y > extreme.y)
{
extreme=convex_hull[n];
continue;
continue;
}
if (convex_hull[n].y != extreme.y)
continue;
continue;
if (convex_hull[n].x > extreme.x)
extreme=convex_hull[n];
}
Expand All @@ -3020,10 +3020,10 @@ MagickExport const char *GetMagickProperty(ImageInfo *image_info,
if (convex_hull[n].x < extreme.x)
{
extreme=convex_hull[n];
continue;
continue;
}
if (convex_hull[n].x != extreme.x)
continue;
continue;
if (convex_hull[n].y > extreme.y)
extreme=convex_hull[n];
}
Expand Down
2 changes: 1 addition & 1 deletion MagickCore/splay-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ static void BalanceSplayTree(SplayTreeInfo *splay_tree)
% The format of the CloneSplayTree method is:
%
% SplayTreeInfo *CloneSplayTree(SplayTreeInfo *splay_tree,
% void *(*clone_key)(void *),void *(*cline_value)(void *))
% void *(*clone_key)(void *),void *(*clone_value)(void *))
%
% A description of each parameter follows:
%
Expand Down
3 changes: 3 additions & 0 deletions coders/miff.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,9 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
{
if (LocaleCompare(keyword,"id") == 0)
{
if (*id != '\0')
ThrowMIFFException(CorruptImageError,
"ImproperImageHeader");
(void) CopyMagickString(id,options,MagickPathExtent);
break;
}
Expand Down

0 comments on commit 966a769

Please sign in to comment.