From: Christian Heimes Date: Mon, 18 Nov 2013 09:30:42 +0000 (+0100) Subject: GetVolumePathNameW: downcast bufsize to DWORD X-Git-Tag: v3.4.0b1~200 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=85ba92a0b80a9e9457a6c637576aa0b35588a566;p=thirdparty%2FPython%2Fcpython.git GetVolumePathNameW: downcast bufsize to DWORD --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 7e6bdc8879e3..c51c8491d7aa 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -4054,7 +4054,8 @@ posix__getvolumepathname(PyObject *self, PyObject *args) return PyErr_NoMemory(); Py_BEGIN_ALLOW_THREADS - ret = GetVolumePathNameW(path, mountpath, bufsize); + ret = GetVolumePathNameW(path, mountpath, + Py_SAFE_DOWNCAST(bufsize, size_t, DWORD)); Py_END_ALLOW_THREADS if (!ret) {