[issue9246] os.getcwd() hardcodes max path len

STINNER Victor report at bugs.python.org
Sat Jul 24 04:05:56 CEST 2010


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Patch based on Python 2 source code, but raises a MemoryError (instead of an OSError) on memory allocation failure.

With my patch, bigpath.py ends with "cwd: 1028 ...aab/aaaaab" with Python Python 3.2. Same result with Python 2.6. 1028 is bigger than 1026 (previous hardcoded max length in bytes including nul byte).

----------
keywords: +patch
Added file: http://bugs.python.org/file18169/os_getcwd_buffer.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9246>
_______________________________________


More information about the Python-bugs-list mailing list