Releases: rtissera/libchdr
v0.3.0
libchdr v0.3.0
First formally tagged release. libchdr has been depended on by RetroArch, DuckStation, Flycast, SwanStation, ps3netsrv-go and others for years; this tag exists so Linux distros (Debian, Ubuntu, Arch, Fedora, OpenBSD, …) can ship a stable reference point instead of dated git20…+dfsg snapshots.
Highlights
Security hardening
- v1/v2 header
hunkbytesnow computed inuint64_t; rejects malformed CHDs where theuint32multiplication would wrap and drive an undersized hunk allocation. metadata_find_entrytraversal capped at 65536 entries; malformed CHDs with cyclicnext-pointer chains no longer produce an unbounded seek+read loop.totalhunkscapped tofile_size * 8; malformed headers can no longer trigger multi-GBmalloc()indecompress_v5_map/map_read(found by the in-tree libFuzzer corpus).chd_get_metadatafallback switched fromsprintftosnprintf.dr_flacupdated to 0.13.3 — ships the fix for CVE-2025-14369 (integer overflow DoS).- Additional memory and overflow fixes via #132.
Portability
- Builds cleanly under
-std=c11 -Werror=implicit-function-declaration(strict libc with no GNU extensions) — closes #92. - 32-bit Linux
time64rebuild works without out-of-tree patches — closes #117.fseeko64/ftello64branch removed; LFS-aliasedfseeko/ftelloused everywhere glibc-like. chd_read_header_core_file_callbacksnow works for CHDv1–v3 — closes #146.
Capacity
CHD_MAX_FILE_SIZEbumped from 10 GB → 1 TB. Legitimate BD50 PS3 ISOs now open — closes #147.
Packaging
CMakeLists.txtproject(chdr VERSION 0.3.0).SOVERSION = 0, so the installed SONAME is stilllibchdr.so.0— Debianlibchdr0/ Ubuntu packages do not rename.- pkg-config
libchdr.pcnow emits fullMAJOR.MINOR.PATCHso downstreams can pin against patch releases. - Installed public header set restricted to
include/libchdr/; exported symbol set restricted tochd_*via linker version script (ELF) /-exported_symbol _chd_*(macOS). Internal codec headers moved tosrc/in #144. cd_codec_decompresssignature is now ABI-stable acrossWANT_SUBCODEconfigurations — consumers and library compiled with mismatched flags no longer silently corrupt the stack.lzma_allocatorembedsISzAllocproperly per the LZMA SDK layout.- Bundled deps:
miniz 3.1.1(replaces zlib),lzma 25.01,zstd 1.5.7single-file,dr_flac 0.13.3.WITH_SYSTEM_ZLIBandWITH_SYSTEM_ZSTDCMake options available for distros that prefer system libraries. - CMake options added:
CHDR_WANT_RAW_DATA_SECTOR,CHDR_WANT_SUBCODE,CHDR_VERIFY_BLOCK_CRC,BUILD_FUZZER,BUILD_LTO.
Tooling
tests/corpus/contains agenerate.shscript that shells out tochdmanto produce a tiny CHDv5 fuzz corpus covering all codecs — ~1.5 MiB total, gitignored.tests/fuzz.c+-DBUILD_FUZZER=ONbuilds an ASan + libFuzzer binary for regression fuzzing.
ABI policy
SOVERSION = PROJECT_VERSION_MAJOR. Bumped only on ABI breaks. The v0.x series ships as libchdr.so.0; a future v1.0.0 would ship as libchdr.so.1. The public header set is restricted to include/libchdr/ and the public symbol set to chd_*.
Known limitations
- AVHuff codec is not implemented (#69). CHDs produced with
CHDCOMPRESSION_AV(CHDv1–v4) or theavhucodec tag (CHDv5) returnCHDERR_UNSUPPORTED_FORMAT. Scope is laserdisc CHDs only (Dragon's Lair, Space Ace, Time Traveler, MAME/Daphne/Hypseus Singe). All other consumers (PS1, PS2, Saturn, Dreamcast, arcade HD, PS3) are unaffected.
Upgrade notes
- No public API breaks vs pre-tag master.
- Distros shipping
libchdr0keep the same SONAME; no package rename needed. - Debian/Ubuntu maintainers can drop out-of-tree patches for
ftello64/time64and strict-C11 builds — both are now fixed upstream.
Thanks
This tag consolidates work from @Clownacy, @stenzek, @xakep666, @alice-mkh, @a-detiste, @invertego, @CasualPokePlayer, @treloret, and the downstream packagers who kept pressing for a formal release.
See the full CHANGELOG for the complete set of changes.