mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
bpo-36352: Avoid hardcoded MAXPATHLEN size in getpath.c (GH-12423)
* Use Py_ARRAY_LENGTH() rather than hardcoded MAXPATHLEN in getpath.c. * Pass string length to functions modifying strings.
This commit is contained in:
parent
5f9cf23502
commit
faddaedd05
4 changed files with 247 additions and 159 deletions
|
@ -1716,7 +1716,7 @@ _Py_wrealpath(const wchar_t *path,
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Get the current directory. size is the buffer size in wide characters
|
||||
/* Get the current directory. buflen is the buffer size in wide characters
|
||||
including the null character. Decode the path from the locale encoding.
|
||||
|
||||
Return NULL on getcwd() error, on decoding error, or if 'buf' is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue