Skip to content

Commit c8c6a0f

Browse files
author
Dirk Lemstra
committed
Fix improper cast that could cause an overflow as demonstrated in #347.
1 parent 930ca78 commit c8c6a0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: coders/psd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,7 @@ ModuleExport MagickBooleanType ReadPSDLayers(Image *image,
16911691
/*
16921692
Layer name.
16931693
*/
1694-
length=(MagickSizeType) ReadBlobByte(image);
1694+
length=(MagickSizeType) (unsigned char) ReadBlobByte(image);
16951695
combined_length+=length+1;
16961696
if (length > 0)
16971697
(void) ReadBlob(image,(size_t) length++,layer_info[i].name);

0 commit comments

Comments
 (0)