[Python-checkins] cpython (merge 3.3 -> default): (Merge 3.3) sysmodule.c: fix sys_update_path(), use Py_ARRAY_LENGTH() to get
victor.stinner
python-checkins at python.org
Fri Nov 15 17:36:04 CET 2013
http://hg.python.org/cpython/rev/f39fac22ca9a
changeset: 87116:f39fac22ca9a
parent: 87114:58ffd70d02b6
parent: 87115:780a0199c7f1
user: Victor Stinner <victor.stinner at gmail.com>
date: Fri Nov 15 17:35:31 2013 +0100
summary:
(Merge 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.
files:
Python/sysmodule.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1959,7 +1959,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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list