diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-12-13 23:21:50 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-12-13 23:21:50 (GMT) |
commit | e847d7170d3f41b1ec773ab203c11f1addd6d4ac (patch) | |
tree | cdf3ce363b979044152a9adb2e5e6b7996629745 /Modules | |
parent | 51a4b22f9935f5419c7b32647369cd1b01373c74 (diff) | |
download | cpython-e847d7170d3f41b1ec773ab203c11f1addd6d4ac.zip cpython-e847d7170d3f41b1ec773ab203c11f1addd6d4ac.tar.gz cpython-e847d7170d3f41b1ec773ab203c11f1addd6d4ac.tar.bz2 |
Issue #25846: Fix usage of Py_ARRAY_LENGTH() in win32_wchdir() (new try)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/posixmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index c25d535..e4b27a7 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1354,7 +1354,7 @@ win32_wchdir(LPCWSTR path) result = GetCurrentDirectoryW(Py_ARRAY_LENGTH(path_buf), new_path); if (!result) return FALSE; - if (result > Py_ARRAY_LENGTH(new_path)) { + if (result > Py_ARRAY_LENGTH(path_buf)) { new_path = PyMem_RawMalloc(result * sizeof(wchar_t)); if (!new_path) { SetLastError(ERROR_OUTOFMEMORY); |