Files
ClawHDF5 Coding Agent 7314971fe7 security(format): add recursion-depth guard to Datatype::parse
Datatype::parse recurses into itself for Compound/Enumeration/
VariableLength/Array/Complex member and base types with no depth
counter. A message data size capped at u16::MAX (65535 bytes) allows
~8000 levels of nesting in a crafted file, enough to blow the stack —
worse on the project's no_std/embedded targets with only a few KB of
stack. Thread a depth counter through a new parse_with_depth, mirroring
object_header.rs's continuation-depth guard, and reject past 64 levels
with FormatError::NestingDepthExceeded. The public Datatype::parse
signature is unchanged.

INT-03
2026-08-17 00:27:16 +00:00
..

clawhdf5-format

crates.io docs.rs

Pure-Rust HDF5 binary format parsing and writing — no C dependencies.

Features

  • Zero-copy superblock, object header, and B-tree parsing
  • Chunked dataset read/write with filter pipelines
  • no_std support (disable std feature)
  • Optional parallel reads via Rayon
  • SHA-256 provenance tracking

Usage

use clawhdf5_format::Superblock;

let data = std::fs::read("data.h5").unwrap();
let sb = Superblock::from_bytes(&data).unwrap();
println!("HDF5 version {}.{}", sb.version_major(), sb.version_minor());

License

MIT