Skip to content

Commit 50f5446

Browse files
author
Cristy
committed
https://github.com/ImageMagick/ImageMagick/issues/713
1 parent c5402b6 commit 50f5446

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: coders/txt.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,9 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
446446
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
447447
image->columns=width;
448448
image->rows=height;
449-
for (depth=1; (GetQuantumRange(depth)+1) < max_value; depth++) ;
449+
for (depth=1; (GetQuantumRange(depth)+1) < max_value; depth++)
450+
if (depth >= 64)
451+
break;
450452
image->depth=depth;
451453
status=SetImageExtent(image,image->columns,image->rows,exception);
452454
if (status == MagickFalse)

0 commit comments

Comments
 (0)