[issue1174606] Reading /dev/zero causes SystemError
Adam Olsen
report at bugs.python.org
Sat May 10 21:27:21 CEST 2008
Adam Olsen <rhamph at gmail.com> added the comment:
new_buffersize returns a size_t. You should use SIZE_MAX instead
(although I don't see it used elsewhere in CPython, so maybe there's
portability problems.)
The call to _PyString_Resize implicitly casts the size_t to Py_ssize_t.
The check against PY_SSIZE_T_MAX does make this safe, but a comment
would make it more obvious.
The latest patch uses spaces for indentation, which don't match up with
the existing tabs.
----------
nosy: +Rhamphoryncus
_____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1174606>
_____________________________________
More information about the Python-bugs-list
mailing list