| Index: third_party/libopenjpeg20/pi.c
|
| diff --git a/third_party/libopenjpeg20/pi.c b/third_party/libopenjpeg20/pi.c
|
| index 9097e31a0ee8808cec207292a176e08ce445509e..0b62a3f7b6e6d2062aa2505053a94887d0b724f3 100644
|
| --- a/third_party/libopenjpeg20/pi.c
|
| +++ b/third_party/libopenjpeg20/pi.c
|
| @@ -1248,7 +1248,7 @@ opj_pi_iterator_t *opj_pi_create_decode(opj_image_t *p_image,
|
| /* memory allocation for include */
|
| l_current_pi->include = 00;
|
| if
|
| - (l_step_l && l_tcp->numlayers < UINT_MAX / l_step_l - 1)
|
| + (l_step_l && l_tcp->numlayers < UINT_MAX / sizeof(OPJ_INT16) / l_step_l - 1)
|
| {
|
| l_current_pi->include = (OPJ_INT16*)opj_calloc((l_tcp->numlayers + 1) * l_step_l, sizeof(OPJ_INT16));
|
| }
|
|
|