From 6bb8884f8829d11d0a72c3c6effe72665a08eb6d Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 24 Aug 2019 21:13:59 -0400 Subject: [PATCH] ... --- MagickCore/property.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MagickCore/property.c b/MagickCore/property.c index ea63b143b..b602a7883 100644 --- a/MagickCore/property.c +++ b/MagickCore/property.c @@ -1640,6 +1640,14 @@ static MagickBooleanType GetEXIFProperty(const Image *image, directory_stack[level].entry=entry; directory_stack[level].offset=tag_offset; level++; + /* + Check for duplicate tag. + */ + for (i=0; i < level; i++) + if (directory_stack[i].directory == (exif+tag_offset1)) + break; + if (i < level) + break; /* duplicate tag */ directory_stack[level].directory=exif+tag_offset1; directory_stack[level].offset=tag_offset2; directory_stack[level].entry=0; -- 2.40.0