diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 3ebb6c9493a..35a067145ae 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -1959,7 +1959,7 @@ sys_update_path(int argc, wchar_t **argv) #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