[issue19636] Fix usage of MAX_PATH in posixmodule.c

STINNER Victor report at bugs.python.org
Mon Nov 18 02:10:37 CET 2013


STINNER Victor added the comment:

Oh, I forgot to mention that my initial concern was the following warning:

  ..\Modules\posixmodule.c(4057): warning C4267: 'function' : conversion from 'size_t' to 'DWORD', possible loss of data [C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\pythoncore.vcxproj]

bufsize (Py_ssize_t) is passed to GetVolumePathNameW() which expected a DWORD. An OverflowError must be raised if bufsize is larger than DWORD_MAX (the constant is defined in Modules/_winapi.c, not in posixmodule.c).

But I prefer to fix the warning after this issue.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19636>
_______________________________________


More information about the Python-bugs-list mailing list