STINNER Victor added the comment: posix__getfullpathname():
- char outbuf[MAX_PATH*2]; + char outbuf[MAX_PATH]; ... - wchar_t woutbuf[MAX_PATH*2], *woutbufp = woutbuf; + wchar_t woutbuf[MAX_PATH], *woutbufp = woutbuf; I don't know what "*2" was used here, probably a mistake with sizeof(wchar_t)=2? (try to allocate bytes, where the length is a number of wide characters) posix__getvolumepathname() is new in Python 3.4, so not need to backport its fix. path_converter(): length = PyBytes_GET_SIZE(bytes); #ifdef MS_WINDOWS - if (length > MAX_PATH) { + if (length > MAX_PATH-1) { FORMAT_EXCEPTION(PyExc_ValueError, "%s too long for Windows"); Py_DECREF(bytes); return 0; I don't know if this fix should be backported to Python 3.3. ---------- components: +Windows _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19636> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com