Skip to content

Commit

Permalink
off by one exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Oct 20, 2023
1 parent 66871a5 commit 5587a0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coders/bmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
(bmp_info.compression == BI_ALPHABITFIELDS))
{
pixel_info=AcquireVirtualMemory(image->rows,MagickMax(bytes_per_line,
image->columns+256UL)*sizeof(*pixels));
image->columns+512UL)*sizeof(*pixels));
if (pixel_info == (MemoryInfo *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
pixels=(unsigned char *) GetVirtualMemoryBlob(pixel_info);
Expand Down

0 comments on commit 5587a0e

Please sign in to comment.