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 4eae304 commit 5919dc6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions coders/viff.c
Expand Up @@ -515,6 +515,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 @@ -804,12 +806,14 @@ ModuleExport size_t RegisterVIFFImage(void)
entry->decoder=(DecodeImageHandler *) ReadVIFFImage;
entry->encoder=(EncodeImageHandler *) WriteVIFFImage;
entry->magick=(IsImageFormatHandler *) IsVIFF;
entry->seekable_stream=MagickTrue;
entry->description=ConstantString("Khoros Visualization image");
entry->module=ConstantString("VIFF");
(void) RegisterMagickInfo(entry);
entry=SetMagickInfo("XV");
entry->decoder=(DecodeImageHandler *) ReadVIFFImage;
entry->encoder=(EncodeImageHandler *) WriteVIFFImage;
entry->seekable_stream=MagickTrue;
entry->description=ConstantString("Khoros Visualization image");
entry->module=ConstantString("VIFF");
(void) RegisterMagickInfo(entry);
Expand Down

0 comments on commit 5919dc6

Please sign in to comment.