Merge pull request #1366 from sebras/fix-out-of-bounds-access
opj_j2k_is_imf_compliant: Fix out of bounds access
This commit is contained in:
commit
67f8a1e430
|
@ -7101,7 +7101,8 @@ static OPJ_BOOL opj_j2k_is_imf_compliant(opj_cparameters_t *parameters,
|
||||||
mainlevel);
|
mainlevel);
|
||||||
ret = OPJ_FALSE;
|
ret = OPJ_FALSE;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
/* Validate sublevel */
|
/* Validate sublevel */
|
||||||
assert(sizeof(tabMaxSubLevelFromMainLevel) ==
|
assert(sizeof(tabMaxSubLevelFromMainLevel) ==
|
||||||
(OPJ_IMF_MAINLEVEL_MAX + 1) * sizeof(tabMaxSubLevelFromMainLevel[0]));
|
(OPJ_IMF_MAINLEVEL_MAX + 1) * sizeof(tabMaxSubLevelFromMainLevel[0]));
|
||||||
|
@ -7115,6 +7116,7 @@ static OPJ_BOOL opj_j2k_is_imf_compliant(opj_cparameters_t *parameters,
|
||||||
sublevel);
|
sublevel);
|
||||||
ret = OPJ_FALSE;
|
ret = OPJ_FALSE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Number of components */
|
/* Number of components */
|
||||||
if (image->numcomps > 3) {
|
if (image->numcomps > 3) {
|
||||||
|
|
Loading…
Reference in New Issue