]> granicus.if.org Git - python/commitdiff
GetVolumePathNameW: downcast bufsize to DWORD
authorChristian Heimes <christian@cheimes.de>
Mon, 18 Nov 2013 09:30:42 +0000 (10:30 +0100)
committerChristian Heimes <christian@cheimes.de>
Mon, 18 Nov 2013 09:30:42 +0000 (10:30 +0100)
Modules/posixmodule.c

index 7e6bdc8879e353ed96effec2003538fae234083b..c51c8491d7aab1292b74bee53887e09af5f8c0aa 100644 (file)
@@ -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) {