Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fix improper cast that could cause an overflow as demonstrated in #347.
  • Loading branch information
dlemstra committed Jan 7, 2017
1 parent 31690df commit 7d65a81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coders/psd.c
Expand Up @@ -1671,7 +1671,7 @@ ModuleExport MagickBooleanType ReadPSDLayers(Image *image,
/*
Layer name.
*/
length=(MagickSizeType) ReadBlobByte(image);
length=(MagickSizeType) (unsigned char) ReadBlobByte(image);
combined_length+=length+1;
if (length > 0)
(void) ReadBlob(image,(size_t) length++,layer_info[i].name);
Expand Down

0 comments on commit 7d65a81

Please sign in to comment.