From faddaedd05ca81a9fed3f315e7bc8dcf455824a2 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 19 Mar 2019 02:58:14 +0100 Subject: 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. --- Python/fileutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/fileutils.c') diff --git a/Python/fileutils.c b/Python/fileutils.c index 0ac690a211..b933874193 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -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 -- cgit v1.2.1