[issue16743] mmap accepts files > 1 GB, but processes only 1 GB
Richard Oudkerk
report at bugs.python.org
Tue Dec 25 01:15:16 CET 2012
Richard Oudkerk added the comment:
This bit looks wrong to me:
if (offset - size > PY_SSIZE_T_MAX)
/* Map area too large to fit in memory */
m_obj->size = (Py_ssize_t) -1;
Should it not be "size - offset" instead of "offset - size"? (offset and size are Py_LONG_LONG.) And there is no check that offset is non-negative.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16743>
_______________________________________
More information about the Python-bugs-list
mailing list