From: Martin v. Löwis Date: Sat, 22 Mar 2008 22:07:13 +0000 (+0000) Subject: Properly terminate file name. X-Git-Tag: v3.0a4~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5021ebc892ebc831cf3ec5b9de2c70717a08b074;p=thirdparty%2FPython%2Fcpython.git Properly terminate file name. --- diff --git a/Python/import.c b/Python/import.c index 8f8341038b96..d201dae54fba 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);