Skip to content

Update bundled OpenJPH to 0.33.0 - #261

Merged
danoli3 merged 1 commit into
masterfrom
deps/openjph-0.33.0
Nov 2, 2026
Merged

danoli3 merged 1 commit into
masterfrom
deps/openjph-0.33.0

Conversation

@danoli3

@danoli3 danoli3 commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Updates bundled OpenJPH from 0.32.0 to upstream tag 0.33.0 (345a8bc) for #259.

OpenJPH is carried inside the OpenEXR tree, but this update is independent of the OpenEXR 3.5.3 snapshot. No library sources were added or removed, so the CMake and Makefile.srcs lists are unchanged. After the import, the only difference from upstream src/core is the existing FreeImage SIMD opt-in and ARM64EC guard in ojph_arch.h, including removal of the Win32 _BitScanForward64 intrinsic pragma. The Win32 AVX2 encoder workaround and the i686 SSE memory-clear fix are now upstream.

The release includes:

  • the HTJ2K one-row codeblock allocation fix (CVE-2026-111151)
  • NLT marker bounds checks, including the 8-bit LUT read that used the whole allocation size
  • precise inverse-LUT encoding, selected by new default arguments so OpenEXR 3.5.3's lossy LJ2K calls stay source compatible

OpenJphNltTest feeds a short 8-bit LUT marker followed by extra bytes, and truncated prefixes of that marker. The Linux OpenJPH ASan job builds and runs it next to VendorCodecTest.

Testing

macOS arm64, static ASan RelWithDebInfo, OpenEXR on, WebP and LibRaw off (this host does not compile the x86 SIMD kernels):

  • 17/17 ctest targets passed, with no AddressSanitizer reports. That includes OpenJphNltTest and VendorCodecTest (EXR ZIP, PIZ, ZSTD, HTJ2K256, HTJ2K32, LJ2K, and deep ZSTD).
  • Restoring the 0.32 8-bit NLT read length on top of this tree makes OpenJphNltTest abort with an AddressSanitizer heap-buffer-overflow: an 18-byte write immediately after an 18-byte allocation. The 0.33 read was put back and the test passes.

x86 SIMD on and off, Windows, and GNU make stay with the existing CI matrix.

Closes #259.

Take upstream tag 0.33.0 for the OpenEXR auxiliary codec, including the
HTJ2K one-row codeblock allocation fix and the NLT marker bounds checks.
Keep the FreeImage SIMD opt-in and ARM64EC guard.
@danoli3
danoli3 merged commit 4d7f851 into master Nov 2, 2026
97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vendored libraries have newer upstream releases

1 participant