mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
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.
This commit is contained in:
parent
2f5bbc6a12
commit
2384714819
1 changed files with 1 additions and 1 deletions
|
@ -1895,7 +1895,7 @@ sys_update_path(int argc, wchar_t **argv)
|
||||||
#else /* All other filename syntaxes */
|
#else /* All other filename syntaxes */
|
||||||
if (_HAVE_SCRIPT_ARGUMENT(argc, argv)) {
|
if (_HAVE_SCRIPT_ARGUMENT(argc, argv)) {
|
||||||
#if defined(HAVE_REALPATH)
|
#if defined(HAVE_REALPATH)
|
||||||
if (_Py_wrealpath(argv0, fullpath, PATH_MAX)) {
|
if (_Py_wrealpath(argv0, fullpath, Py_ARRAY_LENGTH(fullpath))) {
|
||||||
argv0 = fullpath;
|
argv0 = fullpath;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue