summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-fops.c
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/glfs-fops.c')
-rw-r--r--api/src/glfs-fops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index 03a15e6913c..272e75c818c 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -3413,7 +3413,7 @@ gf_dirent_to_dirent(gf_dirent_t *gf_dirent, struct dirent *dirent)
dirent->d_namlen = strlen(gf_dirent->d_name);
#endif
- snprintf(dirent->d_name, NAME_MAX, "%s", gf_dirent->d_name);
+ snprintf(dirent->d_name, NAME_MAX + 1, "%s", gf_dirent->d_name);
}
int
@@ -4904,7 +4904,7 @@ retry:
goto out;
if (loc.path) {
- snprintf(retpath, PATH_MAX, "%s", loc.path);
+ snprintf(retpath, PATH_MAX + 1, "%s", loc.path);
}
out: