mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
NAME_MAX does not include NULL char
This commit is contained in:
parent
3da5f5d130
commit
ca28580746
2
nnn.c
2
nnn.c
|
@ -1855,7 +1855,7 @@ dentfill(char *path, struct entry **dents,
|
||||||
}
|
}
|
||||||
|
|
||||||
dentp = &(*dents)[n];
|
dentp = &(*dents)[n];
|
||||||
xstrlcpy(pnamebuf[n].pname, namep, NAME_MAX);
|
xstrlcpy(pnamebuf[n].pname, namep, NAME_MAX + 1);
|
||||||
dentp->name = pnamebuf[n].pname;
|
dentp->name = pnamebuf[n].pname;
|
||||||
|
|
||||||
dentp->mode = sb.st_mode;
|
dentp->mode = sb.st_mode;
|
||||||
|
|
Loading…
Reference in a new issue