commit ca285807466fdf83a4ce2431ac9277227d6cdbb7
parent 3da5f5d130367ce5fe74ce237e4b7d872d7ad21f
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date: Mon, 18 Dec 2017 00:00:08 +0530
NAME_MAX does not include NULL char
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nnn.c b/nnn.c
@@ -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;