mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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.
This commit is contained in:
parent
acde7347a5
commit
67d70eb957
1 changed files with 1 additions and 2 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue