Issue #25846: Fix usage of Py_ARRAY_LENGTH() in win32_wchdir() (new try)

This commit is contained in:
Victor Stinner 2015-12-14 00:21:50 +01:00
parent 51a4b22f99
commit e847d7170d
1 changed files with 1 additions and 1 deletions

View File

@ -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);