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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user