mirror of
https://github.com/python/cpython.git
synced 2024-12-18 06:14:00 +08:00
bpo-45375: Fix off by one error in buffer allocation (GH-28764)
This commit is contained in:
parent
8e8f752217
commit
6c942a86a4
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user