ImageMagick/CVE-2022-32547.patch
starlet-dx fe66ebdd66 Fix CVE-2022-32547
(cherry picked from commit cb0acf64e2e4f19d225af465e701a869ef681236)
2022-11-22 19:36:47 +08:00

31 lines
1.1 KiB
Diff

From dc070da861a015d3c97488fdcca6063b44d47a7b Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Sat, 9 Apr 2022 08:40:54 -0400
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/pull/5034
---
magick/property.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/magick/property.c b/magick/property.c
index 2d80493dd2..bfc689466d 100644
--- a/magick/property.c
+++ b/magick/property.c
@@ -1526,12 +1526,14 @@ static MagickBooleanType GetEXIFProperty(const Image *image,
}
case EXIF_FMT_SINGLE:
{
- EXIFMultipleValues(4,"%f",(double) *(float *) p1);
+ EXIFMultipleValues(4,"%.20g",(double)
+ ReadPropertySignedLong(endian,p1));
break;
}
case EXIF_FMT_DOUBLE:
{
- EXIFMultipleValues(8,"%f",*(double *) p1);
+ EXIFMultipleValues(8,"%.20g",(double)
+ ReadPropertySignedLong(endian,p1));
break;
}
case EXIF_FMT_STRING: