opj_pi_next_pcrl(): avoid undefined shift behaviour. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2787. Credit to OSS Fuzz
This commit is contained in:
parent
d6654d906c
commit
71b4f5b124
|
@ -526,7 +526,8 @@ static OPJ_BOOL opj_pi_next_pcrl(opj_pi_iterator_t * pi)
|
|||
/* Avoids division by zero */
|
||||
/* Relates to id_000004,sig_06,src_000679,op_arith8,pos_49,val_-17 */
|
||||
/* of https://github.com/uclouvain/openjpeg/issues/938 */
|
||||
if (((comp->dx << levelno) >> levelno) != comp->dx ||
|
||||
if (levelno >= 32 ||
|
||||
((comp->dx << levelno) >> levelno) != comp->dx ||
|
||||
((comp->dy << levelno) >> levelno) != comp->dy) {
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue