libSplash
libSplash copied to clipboard
ColTypeDim et al.: Fix Potential Segfault
From the docs:
Name: H5Tget_member_name
...
The HDF5 Library allocates a buffer to receive the name of the
field. The caller must subsequently free the buffer with
H5free_memory.
Also: passing NULL to str(n)cmp is undefined behavior.
Refs.:
- https://support.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-GetMemberName
- https://support.hdfgroup.org/HDF5/doc/RM/RM_H5.html#Library-FreeMemory
- 2da14a60f2244881829d95987ac6f90cfd34a33b
- https://github.com/openPMD/openPMD-api/pull/962