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 930ca78 commit c8c6a0f123d5e35c173125365c97e2c0fc7eca42
Showing with 1 addition and 1 deletion.
  1. +1 −1 coders/psd.c
@@ -1691,7 +1691,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 c8c6a0f

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