mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-26 04:09:39 +03:00
Three bugs in H5Pget_filter2: 1. cd_nelmts_segment was allocated as JAVA_INT (4 bytes) but size_t* needs 8 bytes on 64-bit — the C write overflowed into cd_values_segment. 2. cd_nelmts[0] was read back from cd_values_segment (wrong) instead of cd_nelmts_segment. 3. cd_values and flags were never copied back from their native segments. Fix: allocate cd_nelmts_segment as JAVA_LONG, seed it with the caller's capacity on input, and copy all three output arrays back correctly.