tiff2vips: avoid g_assert_not_reached
in the default clause (#3064)
Since that could terminate the application in debug builds. Also, add the missing case clause for `PHOTOMETRIC_MINISWHITE`. Resolves: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51013.
This commit is contained in:
parent
db96adfc00
commit
4176ab2106
@ -1937,13 +1937,15 @@ rtiff_decompress_jpeg_run( Rtiff *rtiff, j_decompress_ptr cinfo,
|
|||||||
bytes_per_pixel = 3;
|
bytes_per_pixel = 3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PHOTOMETRIC_MINISWHITE:
|
||||||
case PHOTOMETRIC_MINISBLACK:
|
case PHOTOMETRIC_MINISBLACK:
|
||||||
cinfo->jpeg_color_space = JCS_GRAYSCALE;
|
cinfo->jpeg_color_space = JCS_GRAYSCALE;
|
||||||
bytes_per_pixel = 1;
|
bytes_per_pixel = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached();
|
cinfo->jpeg_color_space = JCS_UNKNOWN;
|
||||||
|
bytes_per_pixel = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user