diff options
author | Steve Dower <steve.dower@python.org> | 2021-10-06 19:09:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-06 19:09:33 (GMT) |
commit | 6c942a86a4fb4c8b731cb1bd2933dba554eb79cd (patch) | |
tree | 84ea222945504f21888203305526ff58f42a6f86 /PC | |
parent | 8e8f7522171ef82f2f5049940f815e00e38c6f42 (diff) | |
download | cpython-6c942a86a4fb4c8b731cb1bd2933dba554eb79cd.zip cpython-6c942a86a4fb4c8b731cb1bd2933dba554eb79cd.tar.gz cpython-6c942a86a4fb4c8b731cb1bd2933dba554eb79cd.tar.bz2 |
bpo-45375: Fix off by one error in buffer allocation (GH-28764)
Diffstat (limited to 'PC')
-rw-r--r-- | PC/getpathp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/PC/getpathp.c b/PC/getpathp.c index 98a7549..062697b 100644 --- a/PC/getpathp.c +++ b/PC/getpathp.c @@ -266,7 +266,7 @@ canonicalize(wchar_t *buffer, const wchar_t *path) } if (PathIsRelativeW(path)) { - wchar_t buff[MAXPATHLEN]; + wchar_t buff[MAXPATHLEN + 1]; if (!GetCurrentDirectoryW(MAXPATHLEN, buff)) { return _PyStatus_ERR("unable to find current working directory"); } |