mirror of https://github.com/python/cpython
SF # 602108 ensure string is null terminated after strncpy
This commit is contained in:
parent
12e9668989
commit
bcf9f9eb3b
|
@ -407,6 +407,7 @@ calculate_path(void)
|
|||
if (progpath[0] != SEP)
|
||||
absolutize(progpath);
|
||||
strncpy(argv0_path, progpath, MAXPATHLEN);
|
||||
argv0_path[MAXPATHLEN] = '\0';
|
||||
|
||||
#ifdef WITH_NEXT_FRAMEWORK
|
||||
/* On Mac OS X we have a special case if we're running from a framework.
|
||||
|
|
Loading…
Reference in New Issue