Make sure we can write jpeg files with an exif profile that has a length of 65533.

This commit is contained in:
Dirk Lemstra
2024-12-02 22:33:53 +01:00
parent 27cb70f495
commit 0cbce1dbbc
+1 -1
View File
@@ -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,