summaryrefslogtreecommitdiff
path: root/PC
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2002-12-31 12:35:41 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2002-12-31 12:35:41 +0000
commit55333493a6a90748c39aec45a5bedd919ac64b15 (patch)
treec7260fb287d9d5c91076fa350cdcc626d62bb470 /PC
parent7d866f41d8b290f34c3a218908d5be958fc381e5 (diff)
downloadcpython-55333493a6a90748c39aec45a5bedd919ac64b15.tar.gz
Make sure zip_path is null-terminated, since it's on the stack
Diffstat (limited to 'PC')
-rw-r--r--PC/getpathp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/PC/getpathp.c b/PC/getpathp.c
index 4930ad8258..ed0a755522 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" */