diff options
author | Tim Peters <tim.peters@gmail.com> | 2006-03-01 04:35:45 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2006-03-01 04:35:45 (GMT) |
commit | 67d70eb957faf61e0cba548fcad374ec361429c4 (patch) | |
tree | c1ef1c0e17e60e27958ff7bd5ff1ba0fb4c1c215 /Modules/posixmodule.c | |
parent | acde7347a547ce515b42805cb18789591c03c016 (diff) | |
download | cpython-67d70eb957faf61e0cba548fcad374ec361429c4.zip cpython-67d70eb957faf61e0cba548fcad374ec361429c4.tar.gz cpython-67d70eb957faf61e0cba548fcad374ec361429c4.tar.bz2 |
Repair mangled code in the Windows flavor of
posix__getfullpathname().
In partial answer to the now-deleted XXX comment:
/* XXX(twouters) Why use 'et#' here at all? insize isn't used */
`insize` is an input parameter too, and it was left uninitialized,
leading to seemingly random failures.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index efe5074..6949c90 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1901,7 +1901,7 @@ posix__getfullpathname(PyObject *self, PyObject *args) /* assume encoded strings wont more than double no of chars */ char inbuf[MAX_PATH*2]; char *inbufp = inbuf; - Py_ssize_t insize; + Py_ssize_t insize = sizeof(inbuf); char outbuf[MAX_PATH*2]; char *temp; #ifdef Py_WIN_WIDE_FILENAMES @@ -1921,7 +1921,6 @@ posix__getfullpathname(PyObject *self, PyObject *args) PyErr_Clear(); } #endif - /* XXX(twouters) Why use 'et#' here at all? insize isn't used */ if (!PyArg_ParseTuple (args, "et#:_getfullpathname", Py_FileSystemDefaultEncoding, &inbufp, &insize)) |