diff options
-rw-r--r-- | Python/fileutils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/fileutils.c b/Python/fileutils.c index bb0cd43..293cb77 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -707,7 +707,8 @@ wchar_t* _Py_wgetcwd(wchar_t *buf, size_t size) { #ifdef MS_WINDOWS - return _wgetcwd(buf, size); + int isize = (int)Py_MIN(size, INT_MAX); + return _wgetcwd(buf, isize); #else char fname[PATH_MAX]; wchar_t *wname; |