diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2002-12-31 12:35:41 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2002-12-31 12:35:41 +0000 |
commit | 55333493a6a90748c39aec45a5bedd919ac64b15 (patch) | |
tree | c7260fb287d9d5c91076fa350cdcc626d62bb470 /PC | |
parent | 7d866f41d8b290f34c3a218908d5be958fc381e5 (diff) | |
download | cpython-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.c | 1 |
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" */ |