Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fixed overflow.
  • Loading branch information
dlemstra committed Jan 15, 2016
1 parent 2174484 commit 6f1879d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coders/psd.c
Expand Up @@ -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");
}
Expand Down

0 comments on commit 6f1879d

Please sign in to comment.