diff options
Diffstat (limited to 'Modules/getpath.c')
-rw-r--r-- | Modules/getpath.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/getpath.c b/Modules/getpath.c index c42ce31..092ccc7 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c @@ -486,7 +486,7 @@ calculate_path(void) if (tmpbuffer[0] == SEP) /* tmpbuffer should never be longer than MAXPATHLEN, but extra check does not hurt */ - strncpy(argv0_path, tmpbuffer, MAXPATHLEN); + strncpy(argv0_path, tmpbuffer, MAXPATHLEN + 1); else { /* Interpret relative to progpath */ reduce(argv0_path); |