From fe43306c43cd28fcab948f67c7bb89af3a011cbe Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 22 Jan 2018 08:05:42 -0500 Subject: [PATCH] Eliminate undefined-shift Credit OSS Fuzz --- coders/dpx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coders/dpx.c b/coders/dpx.c index 6c73c3d4a..6bb57222a 100644 --- a/coders/dpx.c +++ b/coders/dpx.c @@ -1158,7 +1158,7 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) SetPrimaryChromaticity((DPXColorimetric) dpx.image.image_element[n].colorimetric,&image->chromaticity); image->depth=dpx.image.image_element[n].bit_size; - if (image->depth > 32) + if ((image->depth == 0) || (image->depth > 32)) ThrowReaderException(CorruptImageError,"ImproperImageHeader"); samples_per_pixel=1; quantum_type=GrayQuantum; -- 2.40.0