[Python-bugs-list] [ python-Bugs-665014 ] files with long lines and an encoding crash

SourceForge.net noreply@sourceforge.net
Thu, 09 Jan 2003 05:32:21 -0800


Bugs item #665014, was opened at 2003-01-10 00:32
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=665014&group_id=5470

Category: Unicode
Group: None
Status: Open
Resolution: None
Priority: 8
Submitted By: Mark Hammond (mhammond)
Assigned to: M.-A. Lemburg (lemburg)
Summary: files with long lines and an encoding crash

Initial Comment:
If a source file declares an encoding, but has a line >
512 characters, a buffer overflows.  debug builds
assert, but release builds trudge along.

Problem is that when reading an encoded line, the
'size' param is not passed to the underlying readline
function.

Attaching a test case and a patch.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=665014&group_id=5470