[issue18368] PyOS_StdioReadline() leaks memory when realloc() fails

Christian Heimes report at bugs.python.org
Tue Aug 6 16:16:12 CEST 2013


Christian Heimes added the comment:

Serhiy:
Thanks for the review

Kristján:
Yes, it's enough to check for incr > INT_MAX. The buffer size is incremented to a value of <= (2*n)+2 in each round. The start value is 100. The loop is terminated once the buffer size reaches INT_MAX-2.

----------
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> pending

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


More information about the Python-bugs-list mailing list