[issue6817] char buffer in function posix_getcwdu should not be fix length

2010-07-20 Thread Stefan Krah
Stefan Krah added the comment: I'm marking this as a duplicate of issue 9246. It's better to change py3k and 2.7 in sync. The patches here will not be lost. -- components: +Extension Modules nosy: +skrah resolution: -> duplicate stage: -> committed/rejected status: open -> closed supe

[issue6817] char buffer in function posix_getcwdu should not be fix length

2009-09-10 Thread Boya Sun
Boya Sun added the comment: Victor, I corrected both issues of the patch according to your first comment. This patch did not fix the Windows implementation. It seems that there will not be buffer overflow in the Windows implementation, since if the buffer is small for GetCurrentDirectoryW(),

[issue6817] char buffer in function posix_getcwdu should not be fix length

2009-09-07 Thread STINNER Victor
STINNER Victor added the comment: The "#ifdef MS_WINDOWS" is not a the right place in posix_getcwdu(): buf and res are declared but unused, and there is dead code on Windows. The patch only fixes the UNIX implementation, not the Windows implementation. In the py3k branch, bytes and unicode ver

[issue6817] char buffer in function posix_getcwdu should not be fix length

2009-09-07 Thread STINNER Victor
STINNER Victor added the comment: Your patch is mixing tabs and spaces :-/ A "free(tmpbuf);" is missing in "if (res == NULL) return posix_error();". -- nosy: +haypo ___ Python tracker _

[issue6817] char buffer in function posix_getcwdu should not be fix length

2009-09-01 Thread Boya Sun
New submission from Boya Sun : This issue is similar to issue 2722 (http://bugs.python.org/issue2722#), where the char buffer support that the path string has not fixed length in the function posix_getcwd(). In the function posix_getcwdu(), the char buffer is still fix length. But I think the