From 641b934c25e9e042e4cb3779a49550274d88d0dd Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 16 Jun 2019 13:06:24 -0400 Subject: [PATCH] ... --- ChangeLog | 7 ++++++- coders/bmp.c | 3 +++ coders/dib.c | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index af6b8ffc3..4647a6e24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ +2019-06-16 7.0.8-49 Cristy + * Release ImageMagick version 7.0.8-50, GIT revision 15... + 2019-06-14 7.0.8-50 Dirk Lemstra - * Added support for reading all images from a HEIC image (reference + * Added support for reading all images from a HEIC image (reference https://github.com/ImageMagick/ImageMagick/issues/1391). + * Heap-buffer-overflow in MagickCore/fourier.c (reference + https://github.com/ImageMagick/ImageMagick/issues/1588). 2019-06-08 7.0.8-49 Cristy * Release ImageMagick version 7.0.8-49, GIT revision 15708:6d7e1db:20190608 diff --git a/coders/bmp.c b/coders/bmp.c index bcbb1506b..fdabac950 100644 --- a/coders/bmp.c +++ b/coders/bmp.c @@ -1694,6 +1694,9 @@ static MagickBooleanType WriteBMPImage(const ImageInfo *image_info,Image *image, status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception); if (status == MagickFalse) return(status); + if (((image->columns << 3) != (int) (image->columns << 3)) || + ((image->rows << 3) != (int) (image->rows << 3))) + ThrowWriterException(ImageError,"WidthOrHeightExceedsLimit"); type=4; if (LocaleCompare(image_info->magick,"BMP2") == 0) type=2; diff --git a/coders/dib.c b/coders/dib.c index aa93c4a7a..946901529 100644 --- a/coders/dib.c +++ b/coders/dib.c @@ -1137,6 +1137,9 @@ static MagickBooleanType WriteDIBImage(const ImageInfo *image_info,Image *image, status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception); if (status == MagickFalse) return(status); + if (((image->columns << 3) != (int) (image->columns << 3)) || + ((image->rows << 3) != (int) (image->rows << 3))) + ThrowWriterException(ImageError,"WidthOrHeightExceedsLimit"); /* Initialize DIB raster file header. */ -- 2.40.0