File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -139,9 +139,16 @@ static Image *ReadMACImage(const ImageInfo *image_info,ExceptionInfo *exception)
139
139
length = ReadBlobLSBShort (image );
140
140
if ((length & 0xff ) != 0 )
141
141
ThrowReaderException (CorruptImageError ,"CorruptImage" );
142
- for (x = 0 ; x < (ssize_t ) 638 ; x ++ )
143
- if (ReadBlobByte (image ) == EOF )
144
- ThrowReaderException (CorruptImageError ,"CorruptImage" );
142
+ if (length == 0 )
143
+ {
144
+ for (x = 0 ; x < (ssize_t ) 510 ; x ++ )
145
+ if (ReadBlobByte (image ) == EOF )
146
+ ThrowReaderException (CorruptImageError ,"CorruptImage" );
147
+ }
148
+ else
149
+ for (x = 0 ; x < (ssize_t ) 638 ; x ++ )
150
+ if (ReadBlobByte (image ) == EOF )
151
+ ThrowReaderException (CorruptImageError ,"CorruptImage" );
145
152
image -> columns = 576 ;
146
153
image -> rows = 720 ;
147
154
image -> depth = 1 ;
You can’t perform that action at this time.
0 commit comments