mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
bpo-45375: Fix off by one error in buffer allocation (GH-28764)
This commit is contained in:
parent
8e8f752217
commit
6c942a86a4
1 changed files with 1 additions and 1 deletions
|
@ -266,7 +266,7 @@ canonicalize(wchar_t *buffer, const wchar_t *path)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PathIsRelativeW(path)) {
|
if (PathIsRelativeW(path)) {
|
||||||
wchar_t buff[MAXPATHLEN];
|
wchar_t buff[MAXPATHLEN + 1];
|
||||||
if (!GetCurrentDirectoryW(MAXPATHLEN, buff)) {
|
if (!GetCurrentDirectoryW(MAXPATHLEN, buff)) {
|
||||||
return _PyStatus_ERR("unable to find current working directory");
|
return _PyStatus_ERR("unable to find current working directory");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue