From bcf9f9eb3bde3cdac05402d27277d8c40839e4fe Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Fri, 13 Sep 2002 14:35:56 +0000 Subject: SF # 602108 ensure string is null terminated after strncpy --- Modules/getpath.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/getpath.c b/Modules/getpath.c index 3ecdb9d..1841c76b 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c @@ -407,6 +407,7 @@ calculate_path(void) if (progpath[0] != SEP) absolutize(progpath); strncpy(argv0_path, progpath, MAXPATHLEN); + argv0_path[MAXPATHLEN] = '\0'; #ifdef WITH_NEXT_FRAMEWORK /* On Mac OS X we have a special case if we're running from a framework. -- cgit v0.12