Chris AtLee added the comment:

This is a possible fix to this issue. It's not as clean as I'd like, but the 
simpler versions I tried could end up with the entire file contents in memory 
for degenerate (or malicious) inputs.

The trick is handling the case where the current line ends with \r. We can't 
know if this is just a normal character in the file, or represents the end of a 
line until we see the start of the next line.

----------
Added file: http://bugs.python.org/file30503/cgi-cpython.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18167>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to