From: Neal Norwitz Date: Tue, 31 Dec 2002 12:35:41 +0000 (+0000) Subject: Make sure zip_path is null-terminated, since it's on the stack X-Git-Tag: v2.3c1~2733 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a8aed02f1e67be19634cedf6be6d6f469a9e0fb6;p=thirdparty%2FPython%2Fcpython.git Make sure zip_path is null-terminated, since it's on the stack --- diff --git a/PC/getpathp.c b/PC/getpathp.c index 4930ad825837..ed0a75552236 100644 --- a/PC/getpathp.c +++ b/PC/getpathp.c @@ -467,6 +467,7 @@ calculate_path(void) strncpy(zip_path, dllpath, MAXPATHLEN); else /* use name of executable program */ strncpy(zip_path, progpath, MAXPATHLEN); + zip_path[MAXPATHLEN] = '\0'; len = strlen(zip_path); if (len > 4) { zip_path[len-3] = 'z'; /* change ending to "zip" */