Commit 806a016d7 for imagemagick.org
commit 806a016d7c54785c89169f5f51df04a15e97dc3d
Author: Dirk Lemstra <dirk@lemstra.org>
Date: Sat Nov 28 00:10:42 2026 +0100
Crc mismatch should be an error in the bmp encoder.
diff --git a/coders/bmp.c b/coders/bmp.c
index d7467f89c..f9fa11ddf 100644
--- a/coders/bmp.c
+++ b/coders/bmp.c
@@ -1035,9 +1035,7 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
if ((ignore_filesize == MagickFalse) && (bmp_info.file_size != 0) &&
(start_position == 0) && (bmp_info.ba_offset == 0) &&
((MagickSizeType) bmp_info.file_size != blob_size))
- (void) ThrowMagickException(exception,GetMagickModule(),
- CorruptImageWarning,"LengthAndFilesizeDoNotMatch","`%s'",
- image->filename);
+ ThrowReaderException(CorruptImageError,"LengthAndFilesizeDoNotMatch");
if (bmp_info.width <= 0)
ThrowReaderException(CorruptImageError,"NegativeOrZeroImageSize");
if ((bmp_info.height == 0) || (bmp_info.height == (ssize_t) INT_MIN))