[Python-checkins] cpython (3.5): Issue #25846: Fix usage of Py_ARRAY_LENGTH() in win32_wchdir() (new try)

victor.stinner python-checkins at python.org
Sun Dec 13 18:22:29 EST 2015


https://hg.python.org/cpython/rev/aba6caf7b9f0
changeset: 99559:aba6caf7b9f0
branch: 3.5
parent: 99557:ea9951598bab
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Dec 14 00:21:50 2015 +0100
summary:
 Issue #25846: Fix usage of Py_ARRAY_LENGTH() in win32_wchdir() (new try)
files:
 Modules/posixmodule.c | 2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -1354,7 +1354,7 @@
 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);
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /