summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Ff.c
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/src/H5Ff.c')
-rw-r--r--fortran/src/H5Ff.c4
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);
/*