Make sure zip_path is null-terminated, since it's on the stack

This commit is contained in:
Neal Norwitz 2002-12-31 12:45:12 +00:00
parent 5c37a7717d
commit b70557f13d
1 changed files with 1 additions and 0 deletions

View File

@ -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);