Skip to content
Permalink
Browse files Browse the repository at this point in the history
https://github.com/ImageMagick/ImageMagick/issues/713
  • Loading branch information
Cristy committed Sep 1, 2017
1 parent c5402b6 commit 50f5446
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion coders/txt.c
Expand Up @@ -446,7 +446,9 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
image->columns=width;
image->rows=height;
for (depth=1; (GetQuantumRange(depth)+1) < max_value; depth++) ;
for (depth=1; (GetQuantumRange(depth)+1) < max_value; depth++)
if (depth >= 64)
break;
image->depth=depth;
status=SetImageExtent(image,image->columns,image->rows,exception);
if (status == MagickFalse)
Expand Down

0 comments on commit 50f5446

Please sign in to comment.