File ImageMagick-CVE-2022-28463.patch of Package ImageMagick.30356

Index: ImageMagick-7.0.7-34/coders/cin.c
===================================================================
--- ImageMagick-7.0.7-34.orig/coders/cin.c
+++ ImageMagick-7.0.7-34/coders/cin.c
@@ -451,6 +451,8 @@ static Image *ReadCINImage(const ImageIn
   image->endian=(magick[0] == 0x80) && (magick[1] == 0x2a) &&
     (magick[2] == 0x5f) && (magick[3] == 0xd7) ? MSBEndian : LSBEndian;
   cin.file.image_offset=ReadBlobLong(image);
+  if (cin.file.image_offset < 712)
+    ThrowReaderException(CorruptImageError,"ImproperImageHeader");
   offset+=4;
   cin.file.generic_length=ReadBlobLong(image);
   offset+=4;
openSUSE Build Service is sponsored by