[Python-bugs-list] [ python-Bugs-665014 ] files with long lines and an encoding crash
SourceForge.net
noreply@sourceforge.net
Tue, 14 Jan 2003 04:16:24 -0800
Bugs item #665014, was opened at 2003-01-09 14: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: Accepted
Priority: 8
Submitted By: Mark Hammond (mhammond)
>Assigned to: Mark Hammond (mhammond)
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.
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2003-01-14 13:16
Message:
Logged In: YES
user_id=21627
I see. The patch is fine, please apply it.
----------------------------------------------------------------------
Comment By: Mark Hammond (mhammond)
Date: 2003-01-14 12:21
Message:
Logged In: YES
user_id=14198
Test case already attached, as I mentioned. See crash.py.
Sorry, I should have mentioned the assertion failure is
inside the debug crt, which detects the 512 byte buffer
being overwritten due to the lack of a 'size' arg.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-01-14 09:25
Message:
Logged In: YES
user_id=21627
I can't reproduce this. What specific assertion failure do
you get, on what system (Windows, I guess)? Can you please
attach the test case?
----------------------------------------------------------------------
Comment By: M.-A. Lemburg (lemburg)
Date: 2003-01-09 14:54
Message:
Logged In: YES
user_id=38388
Assigned to Martin since he wrote the source code encoding
support.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=665014&group_id=5470