Hirokazu Yamamoto <ocean-c...@m2.ccsnet.ne.jp> added the comment: GetFullPathNameW may return the required buffer size (non-zero value) when buffer is too short. Before r67154, this case was treated as success, so there was possibility of access to uninitialized buffer woutbuf. Fortunately, GetFullPathNameW sets '\0' to woutbuf (this is undocumented behavior), so abspath() returned empty string instead of segmentation fault. But this is still potentially dangerous, so I fixed this by allocating required size buffer and calling GetFullPathNameW again. abspath() returns correct result for any long unicode path now.
But original poster hopes abspath() should return correct result for any long both *str* and unicode path. For str, this issue is not solved yet. -- I'm skeptical abspath() should support longer path than MAX_PATH if ANSI version of Windows API cannot handle such path. Anyway, I won't use such long path. ;-) _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4071> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com