Skip to content
Permalink
Browse files

Fixed overflow.

  • Loading branch information...
dlemstra committed Jan 15, 2016
1 parent 2174484 commit 6f1879d498bcc5cce12fe0c5decb8dbc0f608e5d
Showing with 2 additions and 2 deletions.
  1. +2 −2 coders/psd.c
@@ -2363,8 +2363,8 @@ static MagickBooleanType WriteImageChannels(const PSDInfo *psd_info,
compact_pixels=(unsigned char *) NULL;
if (next_image->compression == RLECompression)
{
compact_pixels=(unsigned char *) AcquireQuantumMemory(2*channels*
next_image->columns,packet_size*sizeof(*compact_pixels));
compact_pixels=(unsigned char *) AcquireQuantumMemory((2*channels*
next_image->columns)+1,packet_size*sizeof(*compact_pixels));
if (compact_pixels == (unsigned char *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
}

0 comments on commit 6f1879d

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