Lines 1237-1243
opj_pi_iterator_t *opj_pi_create_decode(opj_image_t *p_image,
Link Here
|
1237 |
l_current_pi = l_pi; |
1237 |
l_current_pi = l_pi; |
1238 |
|
1238 |
|
1239 |
/* memory allocation for include */ |
1239 |
/* memory allocation for include */ |
1240 |
l_current_pi->include = (OPJ_INT16*) opj_calloc((l_tcp->numlayers +1) * l_step_l, sizeof(OPJ_INT16)); |
1240 |
/* prevent an integer overflow issue */ |
|
|
1241 |
l_current_pi->include = 00; |
1242 |
if (l_step_l <= (SIZE_MAX / (l_tcp->numlayers + 1U))) |
1243 |
{ |
1244 |
l_current_pi->include = (OPJ_INT16*) opj_calloc((l_tcp->numlayers +1) * l_step_l, sizeof(OPJ_INT16)); |
1245 |
} |
1246 |
|
1241 |
if |
1247 |
if |
1242 |
(!l_current_pi->include) |
1248 |
(!l_current_pi->include) |
1243 |
{ |
1249 |
{ |
1244 |
- |
|
|