Commit ec2def154 for imagemagick.org
commit ec2def154e5ff96f74c22bd8a7092e3c3f776b00
Author: Javid Khan <dxbjavid@gmail.com>
Date: Sat Jun 27 17:02:04 2026 +0530
reject otb files that declare more pixels than the file holds (#8826)
diff --git a/coders/otb.c b/coders/otb.c
index 174c80d88..e054af6ea 100644
--- a/coders/otb.c
+++ b/coders/otb.c
@@ -163,6 +163,9 @@ static Image *ReadOTBImage(const ImageInfo *image_info,ExceptionInfo *exception)
(void) CloseBlob(image);
return(GetFirstImageInList(image));
}
+ if ((image->columns > GetBlobSize(image)) ||
+ (image->rows > GetBlobSize(image)))
+ ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");
status=SetImageExtent(image,image->columns,image->rows,exception);
if (status == MagickFalse)
return(DestroyImageList(image));