Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/653
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Aug 7, 2017
1 parent 7d63315 commit 4a25fe5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions coders/viff.c
Expand Up @@ -511,6 +511,8 @@ static Image *ReadVIFFImage(const ImageInfo *image_info,
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
max_packets=(size_t) (number_pixels*viff_info.number_data_bands);
}
if ((bytes_per_pixel*max_packets) > GetBlobSize(image))
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
pixels=(unsigned char *) AcquireQuantumMemory(MagickMax(number_pixels,
max_packets),bytes_per_pixel*sizeof(*pixels));
if (pixels == (unsigned char *) NULL)
Expand Down Expand Up @@ -801,10 +803,12 @@ ModuleExport size_t RegisterVIFFImage(void)
entry->decoder=(DecodeImageHandler *) ReadVIFFImage;
entry->encoder=(EncodeImageHandler *) WriteVIFFImage;
entry->magick=(IsImageFormatHandler *) IsVIFF;
entry->flags|=CoderDecoderSeekableStreamFlag;
(void) RegisterMagickInfo(entry);
entry=AcquireMagickInfo("VIFF","XV","Khoros Visualization image");
entry->decoder=(DecodeImageHandler *) ReadVIFFImage;
entry->encoder=(EncodeImageHandler *) WriteVIFFImage;
entry->flags|=CoderDecoderSeekableStreamFlag;
(void) RegisterMagickInfo(entry);
return(MagickImageCoderSignature);
}
Expand Down

0 comments on commit 4a25fe5

Please sign in to comment.