opj_tcd_dc_level_shift_decode: avoid int32 overflow when prec == 31. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2799. Credit to OSS Fuzz
This commit is contained in:
parent
517bf6fd86
commit
68832af20e
|
@ -1883,7 +1883,7 @@ static OPJ_BOOL opj_tcd_dc_level_shift_decode(opj_tcd_t *p_tcd)
|
||||||
l_max = (1 << (l_img_comp->prec - 1)) - 1;
|
l_max = (1 << (l_img_comp->prec - 1)) - 1;
|
||||||
} else {
|
} else {
|
||||||
l_min = 0;
|
l_min = 0;
|
||||||
l_max = (1 << l_img_comp->prec) - 1;
|
l_max = (OPJ_INT32)((1U << l_img_comp->prec) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
l_current_ptr = l_tile_comp->data;
|
l_current_ptr = l_tile_comp->data;
|
||||||
|
|
Loading…
Reference in New Issue