From b70557f13dc3fe40f1a0e604855acf3e41500c97 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Tue, 31 Dec 2002 12:45:12 +0000 Subject: Make sure zip_path is null-terminated, since it's on the stack --- Modules/getpath.c | 1 + 1 file changed, 1 insertion(+) 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); -- cgit v0.12