Mercurial > cpython-lru_cache-weakref
diff Modules/getpath.c @ 25251:9fcb77b04f97 2.2
SF # 602108 ensure string is null terminated after strncpy
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Fri, 13 Sep 2002 14:40:50 +0000 |
| parents | e223397b26fa |
| children | b9c912e2c3c0 |
line wrap: on
line diff
--- a/Modules/getpath.c Thu Sep 12 14:16:31 2002 +0000 +++ b/Modules/getpath.c Fri Sep 13 14:40:50 2002 +0000 @@ -407,6 +407,7 @@ 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.
