commit | b70557f13dc3fe40f1a0e604855acf3e41500c97 | [log] [tgz] |
---|---|---|
author | Neal Norwitz <nnorwitz@gmail.com> | Tue Dec 31 12:45:12 2002 +0000 |
committer | Neal Norwitz <nnorwitz@gmail.com> | Tue Dec 31 12:45:12 2002 +0000 |
tree | 8fdf21151ece12d4dc2c69274fa9e60ee70c8709 | |
parent | 5c37a7717d7d7190dfa30b33101d6bb4d7aafbde [diff] [blame] |
Make sure zip_path is null-terminated, since it's on the stack
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 @@ 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);