diff options
Diffstat (limited to 'api/src/glfs-fops.c')
-rw-r--r-- | api/src/glfs-fops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c index ba95e021ee2..de5be43f435 100644 --- a/api/src/glfs-fops.c +++ b/api/src/glfs-fops.c @@ -2062,7 +2062,8 @@ gf_dirent_to_dirent (gf_dirent_t *gf_dirent, struct dirent *dirent) dirent->d_namlen = strlen (gf_dirent->d_name); #endif - strncpy (dirent->d_name, gf_dirent->d_name, GF_NAME_MAX + 1); + strncpy (dirent->d_name, gf_dirent->d_name, NAME_MAX); + dirent->d_name[NAME_MAX] = 0; } |