From 4ed7cf68c560fa37deb90af937c406bf05d0d225 Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 5 Feb 2018 20:06:01 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5416 --- coders/jnx.c | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.40.0