summaryrefslogtreecommitdiffstats
path: root/src/H5system.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5system.c')
-rw-r--r--src/H5system.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5system.c b/src/H5system.c
index fe379ad..9a966b0 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -732,8 +732,8 @@ H5_build_extpath(const char *name, char **extpath /*out*/)
HDstrncpy(full_path, cwdpath, cwdlen + 1);
if (!H5_CHECK_DELIMITER(cwdpath[cwdlen - 1]))
- HDstrncat(full_path, H5_DIR_SEPS, HDstrlen(H5_DIR_SEPS));
- HDstrncat(full_path, new_name, HDstrlen(new_name));
+ HDstrncat(full_path, H5_DIR_SEPS, path_len - (cwdlen + 1));
+ HDstrncat(full_path, new_name, path_len - (cwdlen + 1) - HDstrlen(H5_DIR_SEPS));
} /* end if */
} /* end else */