diff options
Diffstat (limited to 'Modules/posixmodule.c')
-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 197607c..b848710 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -3334,7 +3334,7 @@ posix_getcwd(int use_bytes) terminating \0. If the buffer is too small, len includes the space needed for the terminator. */ if (len >= Py_ARRAY_LENGTH(wbuf)) { - if (len >= PY_SSIZE_T_MAX / sizeof(wchar_t)) { + if (len <= PY_SSIZE_T_MAX / sizeof(wchar_t)) { wbuf2 = PyMem_RawMalloc(len * sizeof(wchar_t)); } else { |