mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
Addresses 11 findings from a 12-agent review of the string-based filter
configuration feature:
- H5Opline.c: fail H5Dcreate/H5Ocopy with H5E_BADRANGE when a filter's
config string cannot be persisted because the file's high libver bound
doesn't support pipeline v3, instead of silently dropping the string
with a success return.
- H5Pocpl.c: H5Pget_filter_params_by_idx() now raises H5E_OVERFLOW on
truncation in all three source branches, matching its own sibling
H5Zconfig_get_str(); also stops discarding a genuine H5Z_filter_avail()
failure.
- H5Zdevelop.h / H5Z.c: fix two independently-wrong comments about
H5Z_class3_t's field layout, one of which gave plugin authors unsafe
migration advice for the filter callback's incompatible type change.
- h5zImp.c: fix an out-of-bounds heap write in the JNI H5Zconfig_get_param
long/double/boolean overloads when called with a zero-length array.
- h5tools_dump.c: h5dump -p no longer silently omits an entire filter's
FILTERS{} entry when a decoration buffer fails to allocate.
- tomlc17: add h5_toml_prefix.h, an HDF5-authored (not vendored) header
that force-includes symbol-renaming macros ahead of tomlc17.c, so a
statically-linked libhdf5.a cannot collide with an application's own
copy of tomlc17. Does not touch the pristine vendored files.
- H5Zconfig.c: H5Z_CONFIG_MAX_PARAMS is now actually enforced.
- Six built-in filters: use H5Z_CLASS3_T_VERS instead of a hardcoded
literal for the class version field.
test/tfilter2.c updated to match the new libver-bound failure contract.
Verified via a full rebuild: tfilter2, t_filters_parallel, h5repack
plugin_test_cfg*, and h5dump filter tests all pass.
Deferred by explicit decision (documented in
COMPREHENSIVE_REVIEW_filter_config_string.md): bumping H5P_ENCODE_VERS
and hardening the H5Pdecode() buffer-length gap, both of which need
architecture beyond this fix pass; JNI test coverage for the new API;
and the remaining ~13 Medium/Low findings.