diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2022-01-11 01:01:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-11 01:01:14 (GMT) |
commit | 80017cba4ff4c67aaea70b202745cb7b66100b16 (patch) | |
tree | 3ccd19ead73b05db46bedba27003f95f900184d5 /fortran/src | |
parent | 54237d777aa8146bf41765f2eddedfbe284d2678 (diff) | |
download | hdf5-80017cba4ff4c67aaea70b202745cb7b66100b16.zip hdf5-80017cba4ff4c67aaea70b202745cb7b66100b16.tar.gz hdf5-80017cba4ff4c67aaea70b202745cb7b66100b16.tar.bz2 |
fixed off-by-one error in h5fget_name_f, HDFFV-11290 (#1345)
* fixed off-by-one error in h5fget_name_f, HDFFV-11290
* fixed typo
Diffstat (limited to 'fortran/src')
-rw-r--r-- | fortran/src/H5Ff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c index f943200..339f8b7 100644 --- a/fortran/src/H5Ff.c +++ b/fortran/src/H5Ff.c @@ -583,7 +583,7 @@ h5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen) int_f ret_value = 0; /* Return value */ /* - * Allocate buffer to hold name of an attribute + * Allocate buffer to hold name of file */ if (NULL == (c_buf = (char *)HDmalloc((size_t)*buflen + 1))) HGOTO_DONE(FAIL); @@ -591,7 +591,7 @@ h5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen) /* * Call H5Fget_name function */ - if ((size_c = H5Fget_name((hid_t)*obj_id, c_buf, (size_t)*buflen)) < 0) + if ((size_c = H5Fget_name((hid_t)*obj_id, c_buf, (size_t)*buflen + 1)) < 0) HGOTO_DONE(FAIL); /* |