David Chrsitian added the comment: I don't see any change to the return value of new_buffersize that could alleviate this problem - the problem being that because linux is extremely efficient at reading bytes from /dev/zero, some other code incosistencies are exposed.
The problem that is being hit is that the new_buffersize value is allowed to grow without bounds and is never rechecked for sanity, then is passed in to PyString_Resize where it is converted from unsigned int to signed int. I suggest adding a check of new_buffersize against PY_SSIZE_T_MAX. If it exceeded, we could raise an OverflowError - "unbounded read consumed more bytes than a Python string can hold" ---------- nosy: +dugan _____________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1174606> _____________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com