Replace the assert in mel_init to an if statement to address an issue with fuzzing...
authorAous Naman <aous72@yahoo.com>
Thu, 11 Aug 2022 16:29:40 +0000 (02:29 +1000)
committerGitHub <noreply@github.com>
Thu, 11 Aug 2022 16:29:40 +0000 (18:29 +0200)
commit4da04cd3e88a0280be526e16077c540a45cbbfa8
tree9cc54b9ffc8b81904704b926c390114de940a93d
parent59fb7ea736a10d3476e35f7bbefeb0a74b939607
Replace the assert in mel_init to an if statement to address an issue with fuzzing. (#1436)

Modified the mel_init code to replace the assert statement with an if statement, returning false when an incorrect sequence of bytes are encountered in the MEL segment.  Similar code should be added to the main MEL decoding subrountine, but the change is more involved; in any case, an incorrect sequence produces incorrect results, but should not be harmful or cause a crash.
src/lib/openjp2/ht_dec.c