diff options
| author | 2017-12-18 00:00:08 +0530 | |
|---|---|---|
| committer | 2017-12-18 00:00:08 +0530 | |
| commit | ca285807466fdf83a4ce2431ac9277227d6cdbb7 (patch) | |
| tree | a508b7cb9e3834e941caab65f901af0278db2390 | |
| parent | 3da5f5d130367ce5fe74ce237e4b7d872d7ad21f (diff) | |
| download | nnn-ca285807466fdf83a4ce2431ac9277227d6cdbb7.tar.gz | |
NAME_MAX does not include NULL char
| -rw-r--r-- | nnn.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1855,7 +1855,7 @@ dentfill(char *path, struct entry **dents, } dentp = &(*dents)[n]; - xstrlcpy(pnamebuf[n].pname, namep, NAME_MAX); + xstrlcpy(pnamebuf[n].pname, namep, NAME_MAX + 1); dentp->name = pnamebuf[n].pname; dentp->mode = sb.st_mode; |