[issue11697] Unsigned type in mmap_move_method
Amaury Forgeot d'Arc
report at bugs.python.org
Mon Mar 28 22:17:36 CEST 2011
Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:
Did you see a compiler warning? Indeed, this function (mmap.move) decodes its arguments with:
PyArg_ParseTuple(args, "kkk:move", &dest, &src, &cnt)
This looks wrong to me: these three numbers should be Py_ssize_t, and decoded with "nnn".
An example of wrong behavior (on win32):
>>> m = mmap.mmap(-1, 500)
>>> m.move(2**32, 10, 4) # Should throw a ValueError
----------
nosy: +amaury.forgeotdarc
stage: -> needs patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11697>
_______________________________________
More information about the Python-bugs-list
mailing list