parent
3cee252347
commit
959ebdab5e
|
@ -432,13 +432,17 @@ static void j2k_read_siz(opj_j2k_t *j2k) {
|
||||||
opj_event_msg(j2k->cinfo, EVT_ERROR,
|
opj_event_msg(j2k->cinfo, EVT_ERROR,
|
||||||
"invalid image size (x0:%d, x1:%d, y0:%d, y1:%d)\n",
|
"invalid image size (x0:%d, x1:%d, y0:%d, y1:%d)\n",
|
||||||
image->x0,image->x1,image->y0,image->y1);
|
image->x0,image->x1,image->y0,image->y1);
|
||||||
|
j2k->state |= J2K_STATE_ERR;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
n_comps = (len - 36 - 2 ) / 3;
|
n_comps = (len - 36 - 2 ) / 3;
|
||||||
assert( (len - 36 - 2 ) % 3 == 0 );
|
|
||||||
image->numcomps = cio_read(cio, 2); /* Csiz */
|
image->numcomps = cio_read(cio, 2); /* Csiz */
|
||||||
assert( n_comps == image->numcomps );
|
if (((len - 36 - 2 ) % 3 != 0)||(n_comps != image->numcomps)) {
|
||||||
|
opj_event_msg(j2k->cinfo, EVT_ERROR,"invalid SIZ marker value\n");
|
||||||
|
j2k->state |= J2K_STATE_ERR;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* testcase 4035.pdf.SIGSEGV.d8b.3375 */
|
/* testcase 4035.pdf.SIGSEGV.d8b.3375 */
|
||||||
if (image->x0 > image->x1 || image->y0 > image->y1) {
|
if (image->x0 > image->x1 || image->y0 > image->y1) {
|
||||||
|
|
Loading…
Reference in New Issue