diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2002-12-31 12:45:12 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2002-12-31 12:45:12 (GMT) |
commit | b70557f13dc3fe40f1a0e604855acf3e41500c97 (patch) | |
tree | 8fdf21151ece12d4dc2c69274fa9e60ee70c8709 | |
parent | 5c37a7717d7d7190dfa30b33101d6bb4d7aafbde (diff) | |
download | cpython-b70557f13dc3fe40f1a0e604855acf3e41500c97.zip cpython-b70557f13dc3fe40f1a0e604855acf3e41500c97.tar.gz cpython-b70557f13dc3fe40f1a0e604855acf3e41500c97.tar.bz2 |
Make sure zip_path is null-terminated, since it's on the stack
-rw-r--r-- | Modules/getpath.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/getpath.c b/Modules/getpath.c index 03646a5..6559b06 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c @@ -485,6 +485,7 @@ calculate_path(void) reduce(prefix); strncpy(zip_path, prefix, MAXPATHLEN); + zip_path[MAXPATHLEN] = '\0'; if (pfound > 0) { /* Use the reduced prefix returned by Py_GetPrefix() */ reduce(zip_path); reduce(zip_path); |