diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2002-12-31 12:35:41 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2002-12-31 12:35:41 (GMT) |
commit | a8aed02f1e67be19634cedf6be6d6f469a9e0fb6 (patch) | |
tree | 5509733e728375b56ef153cc7448657354ad7900 /PC/getpathp.c | |
parent | ee711092eb04a125a385e288af19f6c437337326 (diff) | |
download | cpython-a8aed02f1e67be19634cedf6be6d6f469a9e0fb6.zip cpython-a8aed02f1e67be19634cedf6be6d6f469a9e0fb6.tar.gz cpython-a8aed02f1e67be19634cedf6be6d6f469a9e0fb6.tar.bz2 |
Make sure zip_path is null-terminated, since it's on the stack
Diffstat (limited to 'PC/getpathp.c')
-rw-r--r-- | PC/getpathp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/PC/getpathp.c b/PC/getpathp.c index 4930ad8..ed0a755 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" */ |