From 4178aaa98ef317bad99b04c6e8ee64428ac2498a Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sun, 28 Jun 2020 00:52:24 +0530 Subject: Copy the correct length --- src/nnn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nnn.c b/src/nnn.c index 72b0183..4443022 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -6433,7 +6433,7 @@ nochange: */ if (strcmp(path, plgpath) == 0) { xstrsncpy(path, rundir, PATH_MAX); - xstrsncpy(lastname, runfile, NAME_MAX); + xstrsncpy(lastname, runfile, NAME_MAX + 1); rundir[0] = runfile[0] = '\0'; setdirwatch(); goto begin; -- cgit v1.2.3-70-g09d2