mirror of
https://github.com/ImageMagick/ImageMagick.git
synced 2026-06-12 15:37:14 +02:00
...
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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)",
|
||||
|
||||
Reference in New Issue
Block a user