mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Make sure zip_path is null-terminated, since it's on the stack
This commit is contained in:
parent
5c37a7717d
commit
b70557f13d
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue