From 5021ebc892ebc831cf3ec5b9de2c70717a08b074 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 22 Mar 2008 22:07:13 +0000 Subject: [PATCH] Properly terminate file name. --- Python/import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/import.c b/Python/import.c index 8f8341038b..d201dae54f 100644 --- a/Python/import.c +++ b/Python/import.c @@ -997,7 +997,7 @@ get_sourcefile(const char *file) } strncpy(py, file, len-1); - py[len] = '\0'; + py[len-1] = '\0'; if (stat(py, &statbuf) == 0 && S_ISREG(statbuf.st_mode)) { u = PyUnicode_DecodeFSDefault(py); -- 2.49.0