Skip to content

Commit fe43306

Browse files
author
Cristy
committed
Eliminate undefined-shift
Credit OSS Fuzz
1 parent c4b013e commit fe43306

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coders/dpx.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception)
11581158
SetPrimaryChromaticity((DPXColorimetric)
11591159
dpx.image.image_element[n].colorimetric,&image->chromaticity);
11601160
image->depth=dpx.image.image_element[n].bit_size;
1161-
if (image->depth > 32)
1161+
if ((image->depth == 0) || (image->depth > 32))
11621162
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
11631163
samples_per_pixel=1;
11641164
quantum_type=GrayQuantum;

0 commit comments

Comments
 (0)