From 0cbce1dbbc2ceddd032012c6f4e6d70fe3bce7a2 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Mon, 2 Dec 2024 22:33:53 +0100 Subject: [PATCH] Make sure we can write jpeg files with an exif profile that has a length of 65533. --- coders/jpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coders/jpeg.c b/coders/jpeg.c index f3a5f867d1..607496e0e7 100644 --- a/coders/jpeg.c +++ b/coders/jpeg.c @@ -2217,7 +2217,7 @@ static void WriteProfiles(j_compress_ptr jpeg_info,Image *image, jpeg_write_marker(jpeg_info,marker,GetStringInfoDatum(profile)+i, MagickMin((unsigned int) length-i,65533L)); } - if ((LocaleCompare(name,"EXIF") == 0) && (length < 65533L)) + if (LocaleCompare(name,"EXIF") == 0) { if (length > 65533L) (void) ThrowMagickException(exception,GetMagickModule(),CoderWarning,