Skip to content

Commit f663dfb

Browse files
author
Cristy
committed
https://github.com/ImageMagick/ImageMagick/issues/1546
1 parent 9204adf commit f663dfb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: coders/xwd.c

+3
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ static Image *ReadXWDImage(const ImageInfo *image_info,ExceptionInfo *exception)
243243
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
244244
if ((header.bits_per_pixel == 0) || (header.bits_per_pixel > 32))
245245
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
246+
if ((header.bitmap_bit_order != MSBFirst) &&
247+
(header.bitmap_bit_order != LSBFirst))
248+
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
246249
if (((header.bitmap_pad % 8) != 0) || (header.bitmap_pad > 32))
247250
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
248251
if (header.bitmap_unit > 32)

0 commit comments

Comments
 (0)