summaryrefslogtreecommitdiffstats
path: root/src/H5Gname.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Gname.c')
-rw-r--r--src/H5Gname.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Gname.c b/src/H5Gname.c
index bde9e23..f5db1d0 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -1162,7 +1162,7 @@ H5G_get_name_by_addr(hid_t file, hid_t lapl_id, hid_t dxpl_id, const H5O_loc_t *
/* Append the rest of the path */
/* (less one character, for the initial path separator) */
- HDstrncat(name, udata.path, (size - 1));
+ HDstrncat(name, udata.path, (size - 2));
if((size_t)ret_value >= size)
name[size - 1] = '\0';
} /* end if */