Closed polivbr closed 6 years ago
Great catch! The prototype in H5Fpublic.h
is
H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void * buf_ptr, size_t buf_len);
There's a mistake in the documentation https://support.hdfgroup.org/HDF5/doc/RM/RM_H5F.html#File-GetFileImage
ssize_t H5Fget_file_image( hid_t file_id, void *buf_ptr, size_t *buf_len );
which I must have been following at the time.
The buf_len parameter to H5F.get_file_image() is currently passed by ref, which is causing the address to the variable to be passed to the underlying H5Fget_file_image() function, rather than the value.
A quick scan of the other methods on the H5F class makes me think there are other methods which have this same issue, but I haven't had time to verify.