From 164af31c8d4d5afd0a5a6a7e27078b5d579adc56 Mon Sep 17 00:00:00 2001 From: Cristy Date: Fri, 2 Mar 2018 06:23:51 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6653 --- coders/scr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coders/scr.c b/coders/scr.c index a418e630c..6fcd1b11a 100644 --- a/coders/scr.c +++ b/coders/scr.c @@ -160,8 +160,11 @@ static Image *ReadSCRImage(const ImageInfo *image_info,ExceptionInfo *exception) if (status == MagickFalse) return(DestroyImageList(image)); count=ReadBlob(image,6144,(unsigned char *) zxscr); - (void) count; + if (count != 6144) + ThrowReaderException(CorruptImageError,"ImproperImageHeader"); count=ReadBlob(image,768,(unsigned char *) zxattr); + if (count != 768) + ThrowReaderException(CorruptImageError,"ImproperImageHeader"); for(zonenr=0;zonenr<3;zonenr++) { for(zoneline=0;zoneline<8;zoneline++) -- 2.40.0