opj_j2k_is_imf_compliant: Fix out of bounds access. 1366/head
authorSebastian Rasmussen <sebras@gmail.com>
Mon, 12 Jul 2021 13:31:28 +0000 (15:31 +0200)
committerSebastian Rasmussen <sebras@gmail.com>
Mon, 12 Jul 2021 13:32:39 +0000 (15:32 +0200)
commite0993d072a0cd8c60d9babd30c58320f13eff867
tree72223dce1369433fb6f4c1948e58b33a5462393f
parent00beb209531cc258b71f81653299dcadd880b0aa
opj_j2k_is_imf_compliant: Fix out of bounds access.

Previously when mainlevel was parsed == 12 openjpeg would generate
a warning, but then the sublevel value would be compared to an out
of bounds element in the tabMaxSubLevelFromMainLevel array. From
this commit OpenJPEG will only use mainlevel if in range.
src/lib/openjp2/j2k.c