From: Cristy Date: Tue, 6 Feb 2018 01:06:01 +0000 (-0500) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5416 X-Git-Tag: 7.0.7-23~118 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ed7cf68c560fa37deb90af937c406bf05d0d225;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5416 --- diff --git a/coders/jnx.c b/coders/jnx.c index dea645f79..aa003684b 100644 --- a/coders/jnx.c +++ b/coders/jnx.c @@ -281,6 +281,8 @@ static Image *ReadJNXImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Read a tile. */ + if (((MagickSizeType) tile_length) > GetBlobSize(image)) + ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile"); blob=(unsigned char *) AcquireQuantumMemory((size_t) tile_length+2, sizeof(*blob)); if (blob == (unsigned char *) NULL)