Skip to content
Permalink
Browse files Browse the repository at this point in the history
...
  • Loading branch information
Cristy committed May 8, 2016
1 parent 53a0840 commit 58cf5bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 1 addition & 2 deletions coders/jpeg.c
Expand Up @@ -1229,8 +1229,7 @@ static Image *ReadJPEGImage(const ImageInfo *image_info,
if (option != (const char *) NULL)
if (AcquireImageColormap(image,StringToUnsignedLong(option)) == MagickFalse)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
if ((jpeg_info.output_components == 1) &&
(jpeg_info.quantize_colors == 0))
if ((jpeg_info.output_components == 1) && (jpeg_info.quantize_colors == 0))
{
size_t
colors;
Expand Down
11 changes: 7 additions & 4 deletions coders/tiff.c
Expand Up @@ -1888,9 +1888,6 @@ RestoreMSCWarning
columns,
rows;

size_t
number_pixels;

/*
Convert tiled TIFF image to DirectClass MIFF image.
*/
Expand All @@ -1901,7 +1898,13 @@ RestoreMSCWarning
ThrowReaderException(CoderError,"ImageIsNotTiled");
}
(void) SetImageStorageClass(image,DirectClass);
number_pixels=columns*rows;
number_pixels=(MagickSizeType) columns*rows;
if ((number_pixels*sizeof(uint32)) != (MagickSizeType) ((size_t)
(number_pixels*sizeof(uint32))))
{
TIFFClose(tiff);
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
}
tile_pixels=(uint32 *) AcquireQuantumMemory(number_pixels,
sizeof(*tile_pixels));
if (tile_pixels == (uint32 *) NULL)
Expand Down

0 comments on commit 58cf5bf

Please sign in to comment.