[issue10308] Modules/getpath.c bugs

2019-02-25 Thread STINNER Victor
STINNER Victor added the comment: I reviewed getpath.diff: diff -pru Python-2.7/Modules/getpath.c Python-2.7/Modules/getpath.c --- Python-2.7/Modules/getpath.c +++ Python-2.7/Modules/getpath.c @@ -218,7 +218,7 @@ joinpath(char *buffer, char *stuff) if (n > MAXPATHLEN) Py_FatalErr

[issue10308] Modules/getpath.c bugs

2019-02-24 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue10308] Modules/getpath.c bugs

2015-04-20 Thread STINNER Victor
STINNER Victor added the comment: > Reading msg120918 and msg120940 it looks as if work has been completed so > this can be closed as fixed. Attached patch contains more fixes. -- ___ Python tracker _

[issue10308] Modules/getpath.c bugs

2015-04-20 Thread Mark Lawrence
Mark Lawrence added the comment: Reading msg120918 and msg120940 it looks as if work has been completed so this can be closed as fixed. -- nosy: +BreamoreBoy ___ Python tracker

[issue10308] Modules/getpath.c bugs

2010-11-11 Thread Hallvard B Furuseth
Hallvard B Furuseth added the comment: STINNER Victor writes: > The following change is useless, it cannot overflow: > -if (n + k > MAXPATHLEN) > +if (k > MAXPATHLEN - n) > k = MAXPATHLEN - n; > > n and k maximum values are MAXPATHLEN (and the maximum value of > MAXPATHLEN is 4

[issue10308] Modules/getpath.c bugs

2010-11-11 Thread STINNER Victor
STINNER Victor added the comment: r86399 fixes the code checking PyUnicode_AsWideChar() failure. The following change is useless, it cannot overflow: -if (n + k > MAXPATHLEN) +if (k > MAXPATHLEN - n) k = MAXPATHLEN - n; n and k maximum values are MAXPATHLEN (and the maximum v

[issue10308] Modules/getpath.c bugs

2010-11-07 Thread STINNER Victor
STINNER Victor added the comment: 3.2a3 chunk#2 cannot fail because PyUnicode_AsWideChar() only returns -1 if the first argument is NULL, whereas we just checked that decoded is not NULL. But it would be better to fix the variable type to avoid future bugs. -- ___

[issue10308] Modules/getpath.c bugs

2010-11-04 Thread Hallvard B Furuseth
Changes by Hallvard B Furuseth : -- versions: +Python 2.7, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue10308] Modules/getpath.c bugs

2010-11-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue10308] Modules/getpath.c bugs

2010-11-04 Thread Hallvard B Furuseth
New submission from Hallvard B Furuseth : Patches for getpath.c in Python 2.7 and 3.2a3: 2.7 chunk#2: copy_absolute() would use uninitialized data if getcwd() failed. The fix is equivalent to what 3.2a3 does. 3.2a3 chunk#2: search_for_exec_prefix() did 'unsigned value >= 0' on the PyUnicode_As