This commit is contained in:
Cristy
2018-09-30 18:49:21 -04:00
parent 870dd03b2f
commit 59f28acff0
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -2551,7 +2551,7 @@ static MagickBooleanType WriteJPEGImage(const ImageInfo *image_info,
if (value != (char *) NULL)
colorspace=StringToInteger(value);
sampling_factor=(const char *) NULL;
if (colorspace == jpeg_info.in_color_space)
if ((J_COLOR_SPACE) colorspace == jpeg_info.in_color_space)
{
value=GetImageOption(image_info,"jpeg:sampling-factor");
if (value == (char *) NULL)
+2 -2
View File
@@ -444,7 +444,7 @@ static unsigned char *DecodeImage(Image *blob,Image *image,
bytes_per_line=width;
row_bytes=(size_t) (image->columns | 0x8000);
if (image->storage_class == DirectClass)
row_bytes=(size_t) ((4*image->columns) | 0x8000);
row_bytes=(size_t) (4*(image->columns | 0x8000));
/*
Allocate pixel and scanline buffer.
*/
@@ -1778,7 +1778,7 @@ static MagickBooleanType WritePICTImage(const ImageInfo *image_info,
/*
Allocate memory.
*/
bytes_per_line=image->columns;
bytes_per_line=image->columns | 0x8000;
if (storage_class == DirectClass)
bytes_per_line*=image->alpha_trait != UndefinedPixelTrait ? 4 : 3;
buffer=(unsigned char *) AcquireQuantumMemory(PictInfoSize,sizeof(*buffer));
+3 -3
View File
@@ -4637,9 +4637,9 @@ static Image *ReadOneJNGImage(MngInfo *mng_info,
chunk=(unsigned char *) RelinquishMagickMemory(chunk);
if (jng_width > 65535 || jng_height > 65535 ||
(long) jng_width > GetMagickResourceLimit(WidthResource) ||
(long) jng_height > GetMagickResourceLimit(HeightResource))
if ((jng_width > 65535) || (jng_height > 65535) ||
(MagickSizeType) jng_width > GetMagickResourceLimit(WidthResource) ||
(MagickSizeType) jng_height > GetMagickResourceLimit(HeightResource))
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" JNG width or height too large: (%lu x %lu)",