Addressed a potential issue where the application could be exposed to Heap-based Buffer Overflow Remote Code Execution vulnerability and crash. This occurs as the application writes the data based on the wrong region calculated when parsing certain JPEG2000 files. (CVE-2021-34971)