Check SSIZ is valid in opj_j2k_read_siz (#762)
This commit is contained in:
parent
29313eb5f1
commit
e166e4a209
@ -2154,10 +2154,16 @@ static OPJ_BOOL opj_j2k_read_siz(opj_j2k_t *p_j2k,
|
||||
if( l_img_comp->dx < 1 || l_img_comp->dx > 255 ||
|
||||
l_img_comp->dy < 1 || l_img_comp->dy > 255 ) {
|
||||
opj_event_msg(p_manager, EVT_ERROR,
|
||||
"Invalid values for comp = %d : dx=%u dy=%u\n (should be between 1 and 255 according the JPEG2000 norm)",
|
||||
"Invalid values for comp = %d : dx=%u dy=%u (should be between 1 and 255 according to the JPEG2000 norm)\n",
|
||||
i, l_img_comp->dx, l_img_comp->dy);
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
if( l_img_comp->prec > 38) { /* TODO openjpeg won't handle more than ? */
|
||||
opj_event_msg(p_manager, EVT_ERROR,
|
||||
"Invalid values for comp = %d : prec=%u (should be between 1 and 38 according to the JPEG2000 norm)\n",
|
||||
i, l_img_comp->prec);
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
#ifdef USE_JPWL
|
||||
if (l_cp->correct) {
|
||||
|
@ -37,7 +37,7 @@ set(BLACKLIST_JPEG2000_TMP
|
||||
#edf_c2_20.jp2 #looks ok as per kdu_jp2info
|
||||
edf_c2_1377017.jp2
|
||||
edf_c2_1002767.jp2
|
||||
#edf_c2_10025.jp2
|
||||
edf_c2_10025.jp2
|
||||
edf_c2_1000234.jp2
|
||||
edf_c2_225881.jp2
|
||||
edf_c2_1000671.jp2
|
||||
@ -46,6 +46,7 @@ set(BLACKLIST_JPEG2000_TMP
|
||||
edf_c2_101463.jp2
|
||||
edf_c2_1674177.jp2
|
||||
edf_c2_1673169.jp2
|
||||
issue418.jp2
|
||||
issue429.jp2
|
||||
issue427-null-image-size.jp2
|
||||
issue427-illegal-tile-offset.jp2
|
||||
|
Loading…
Reference in New Issue
Block a user