New submission from Hallvard B Furuseth <h.b.furus...@usit.uio.no>: 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_AsWideChar() result. (The fix just renames n to k of signed type, and moves the variables. An outer uninitialized 'size_t n' is in scope, so renaming the inner n to k leaves 'n=fread()' still a size_t.) Chunk #1, both versions: Fix an unlikely 'n+k' wraparound bug while I'm at it. The code has just checked that MAXPATHLEN-n will not wrap. ---------- files: getpath.diff keywords: patch messages: 120390 nosy: hfuru priority: normal severity: normal status: open title: Modules/getpath.c bugs type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file19486/getpath.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10308> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com