Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 85ba92a

Browse files
committed
GetVolumePathNameW: downcast bufsize to DWORD
1 parent b08ff7d commit 85ba92a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/posixmodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4054,7 +4054,8 @@ posix__getvolumepathname(PyObject *self, PyObject *args)
40544054
return PyErr_NoMemory();
40554055

40564056
Py_BEGIN_ALLOW_THREADS
4057-
ret = GetVolumePathNameW(path, mountpath, bufsize);
4057+
ret = GetVolumePathNameW(path, mountpath,
4058+
Py_SAFE_DOWNCAST(bufsize, size_t, DWORD));
40584059
Py_END_ALLOW_THREADS
40594060

40604061
if (!ret) {

0 commit comments

Comments
 (0)