Skip to content

Commit 41399a3

Browse files
committed
Added check for empty extent.
1 parent 5a4c9cf commit 41399a3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

coders/ps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ static void ReadPSInfo(const ImageInfo *image_info,Image *image,
407407
*/
408408
p=GetMagickByteBufferDatum(&buffer);
409409
count=(ssize_t) sscanf(p,PhotoshopProfile " %lu",&extent);
410-
if (count != 1)
410+
if ((count != 1) || (extent == 0))
411411
continue;
412412
if ((MagickSizeType) extent > GetBlobSize(image))
413413
continue;

0 commit comments

Comments
 (0)