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) && defined(PYCC_GCC) res = _getcwd2(buf, sizeof buf); #else res = getcwd(buf, sizeof buf); #endif ... } In my opinion, the fixed length buf should be discarded and instead allocate memory to buf as needed (as the fix code in posix_getcwd()), since getcwd() does not have a maximum anymore. ---------- nosy: +boya _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2722> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com