Boya Sun boya@case.edu added the comment:
This bug occurred in posix_getcwd() and is being fixed.
Should the following code in posix_getcwdu() also be fixed the same way?
posix_getcwdu(PyObject *self, PyObject *noargs)
{
char buf[1026];
...
#if defined(PYOS_OS2)
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Please open a new issue; and a patch is welcome.
--
nosy: +amaury.forgeotdarc
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2722
Boya Sun boya@case.edu added the comment:
Amaury,
Created issue 6817 with a patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2722
___
Facundo Batista [EMAIL PROTECTED] added the comment:
Went for the malloc only patch. Just fixed a small detail (weird corner
case if malloc returned NULL first time, res will be unassigned).
The test could be better (no necessity of using a recursive function, it
could be done with a while),
Changes by Neil Blakey-Milner [EMAIL PROTECTED]:
Added file: http://bugs.python.org/file10241/python-getcwd-malloconly.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2722
__
Neil Blakey-Milner [EMAIL PROTECTED] added the comment:
Here's a patch to add a test that fails with Python 2.5 on OS X, but
passes with either of these patches.
Added file:
http://bugs.python.org/file10250/python-getcwd-test_longpathnames.patch
__
Tracker
Matthias Urlichs [EMAIL PROTECTED] added the comment:
MAX_PATH is a compile time constant which, like FD_BITS for select(),
may be too small for the system you're ultimately running on.
Using that as default initial size is OK, but handling ERANGE is still a
very good idea.
--
nosy:
Changes by Gregory P. Smith [EMAIL PROTECTED]:
--
keywords: +easy
nosy: +gregory.p.smith
priority: - normal
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2722
__
___
Changes by Giampaolo Rodola' [EMAIL PROTECTED]:
--
nosy: +giampaolo.rodola
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2722
__
___
Python-bugs-list mailing list
Georg Brandl [EMAIL PROTECTED] added the comment:
Why isn't the buffer length MAX_PATH anyway?
--
nosy: +georg.brandl
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2722
__
New submission from Jean-Paul Calderone [EMAIL PROTECTED]:
$ python -c print len('`pwd`'); import os; print os.getcwd()
1174
Traceback (most recent call last):
File string, line 1, in ?
OSError: [Errno 34] Numerical result out of range
$
The getcwd man page documents the ERANGE failure and
11 matches
Mail list logo