Skip to content
Permalink
Browse files

Fix improper cast that could cause an overflow as demonstrated in #347.

  • Loading branch information...
dlemstra committed Jan 7, 2017
1 parent 31690df commit 7d65a814ac76bd04760072c33e452371692ee790
Showing with 1 addition and 1 deletion.
  1. +1 −1 coders/psd.c
@@ -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);

0 comments on commit 7d65a81

Please sign in to comment.
You can’t perform that action at this time.