Mercurial > cpython-lru_cache-weakref
diff Python/sysmodule.c @ 87115:780a0199c7f1 3.3
sysmodule.c: fix sys_update_path(), use Py_ARRAY_LENGTH() to get the size of
the fullpath buffer, not PATH_MAX. fullpath is declared using MAXPATHLEN or
MAX_PATH depending on the OS, and PATH_MAX is not declared on IRIX.
| author | Victor Stinner <victor.stinner@gmail.com> |
|---|---|
| date | Fri, 15 Nov 2013 17:33:43 +0100 |
| parents | 694e50a79638 |
| children | f39fac22ca9a |
line wrap: on
line diff
--- a/Python/sysmodule.c Fri Nov 15 17:09:24 2013 +0100 +++ b/Python/sysmodule.c Fri Nov 15 17:33:43 2013 +0100 @@ -1895,7 +1895,7 @@ #else /* All other filename syntaxes */ if (_HAVE_SCRIPT_ARGUMENT(argc, argv)) { #if defined(HAVE_REALPATH) - if (_Py_wrealpath(argv0, fullpath, PATH_MAX)) { + if (_Py_wrealpath(argv0, fullpath, Py_ARRAY_LENGTH(fullpath))) { argv0 = fullpath; } #endif
