Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(22685)

#9246: os.getcwd() hardcodes max path len

Can't Edit
Can't Publish+Mail
Start Review
Created:
8 years, 3 months ago by pitrou
Modified:
4 years, 4 months ago
Reviewers:
victor.stinner, storchaka, will
CC:
loewis, terry.reedy, AntoinePitrou, haypo, giampaolo.rodola, boya.sun_case.edu, santa4nt, devnull_psf.upfronthosting.co.za, Zach Ware, storchaka, worr
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Total comments: 6

Patch Set 3 #

Total comments: 4

Patch Set 4 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Modules/posixmodule.c View 1 2 3 2 chunks +29 lines, -8 lines 0 comments Download

Messages

Total messages: 5
victor.stinner_gmail.com
https://bugs.python.org/review/9246/diff/14573/Modules/posixmodule.c File Modules/posixmodule.c (right): https://bugs.python.org/review/9246/diff/14573/Modules/posixmodule.c#newcode3264 Modules/posixmodule.c:3264: PyObject *ret; I don't like having "res" and "ret" ...
4 years, 5 months ago #1
storchaka_gmail.com
https://bugs.python.org/review/9246/diff/14573/Modules/posixmodule.c File Modules/posixmodule.c (right): https://bugs.python.org/review/9246/diff/14573/Modules/posixmodule.c#newcode3313 Modules/posixmodule.c:3313: if ((buf = realloc(buf, buflen)) == NULL) { On ...
4 years, 5 months ago #2
worr
On 2015/04/19 06:36:50, storchaka wrote: > https://bugs.python.org/review/9246/diff/14573/Modules/posixmodule.c > File Modules/posixmodule.c (right): > > https://bugs.python.org/review/9246/diff/14573/Modules/posixmodule.c#newcode3313 > ...
4 years, 5 months ago #3
worr
On 2015/04/19 00:43:59, haypo wrote: > https://bugs.python.org/review/9246/diff/14573/Modules/posixmodule.c > File Modules/posixmodule.c (right): > > https://bugs.python.org/review/9246/diff/14573/Modules/posixmodule.c#newcode3264 > ...
4 years, 5 months ago #4
victor.stinner_gmail.com
4 years, 4 months ago #5
https://bugs.python.org/review/9246/diff/14689/Modules/posixmodule.c
File Modules/posixmodule.c (right):

https://bugs.python.org/review/9246/diff/14689/Modules/posixmodule.c#newcode3318
Modules/posixmodule.c:3318: cwd = NULL;
cwd should already be cwd at this point, maybe replace the assignation with an
assertion.

https://bugs.python.org/review/9246/diff/14689/Modules/posixmodule.c#newcode3329
Modules/posixmodule.c:3329: buf = NULL;
No need to clear buf here.

https://bugs.python.org/review/9246/diff/14689/Modules/posixmodule.c#newcode3339
Modules/posixmodule.c:3339: PyMem_RawFree(buf);
Please move this call just after the previous if, and add an empty line after
PyMem_RawFree() show show that the two instructions are linked.

(The empty line is maybe not needed.)

https://bugs.python.org/review/9246/diff/14689/Modules/posixmodule.c#newcode3340
Modules/posixmodule.c:3340: buf = NULL;
No need to clear buf here.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+