summaryrefslogtreecommitdiffstats
path: root/218d6abc4e36596c90a07463bfb2ab9e8312efbb.patch
diff options
context:
space:
mode:
Diffstat (limited to '218d6abc4e36596c90a07463bfb2ab9e8312efbb.patch')
-rw-r--r--218d6abc4e36596c90a07463bfb2ab9e8312efbb.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/218d6abc4e36596c90a07463bfb2ab9e8312efbb.patch b/218d6abc4e36596c90a07463bfb2ab9e8312efbb.patch
new file mode 100644
index 0000000..cedecca
--- /dev/null
+++ b/218d6abc4e36596c90a07463bfb2ab9e8312efbb.patch
@@ -0,0 +1,32 @@
+From 218d6abc4e36596c90a07463bfb2ab9e8312efbb Mon Sep 17 00:00:00 2001
+From: Dirk Lemstra <dirk@lemstra.org>
+Date: Sat, 13 Jun 2020 18:00:50 +0200
+Subject: [PATCH] Check the type of the field before performing the
+ multiplication.
+
+---
+ coders/tiff.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/coders/tiff.c b/coders/tiff.c
+index 61858c3cc..25a939811 100644
+--- a/coders/tiff.c
++++ b/coders/tiff.c
+@@ -638,9 +638,16 @@ static MagickBooleanType TIFFGetProfiles(TIFF *tiff,Image *image)
+ if ((TIFFGetField(tiff,TIFFTAG_RICHTIFFIPTC,&length,&profile) == 1) &&
+ (profile != (unsigned char *) NULL))
+ {
++ const TIFFField
++ *field;
++
+ if (TIFFIsByteSwapped(tiff) != 0)
+ TIFFSwabArrayOfLong((uint32 *) profile,(size_t) length);
+- status=ReadProfile(image,"iptc",profile,4L*length);
++ field=TIFFFieldWithTag(tiff,TIFFTAG_RICHTIFFIPTC);
++ if (TIFFFieldDataType(field) == TIFF_LONG)
++ status=ReadProfile(image,"iptc",profile,4L*length);
++ else
++ status=ReadProfile(image,"iptc",profile,length);
+ }
+ #endif
+ #if defined(TIFFTAG_XMLPACKET)