[Mono-bugs] [Bug 80329][Cri] New - TermInfoDriver buffer overflows after 1025 keystrokes
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Dec 20 11:09:13 EST 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by moritz.kroll at gmx.de.
http://bugzilla.ximian.com/show_bug.cgi?id=80329
--- shadow/80329 2006-12-20 11:09:13.000000000 -0500
+++ shadow/80329.tmp.10437 2006-12-20 11:09:13.000000000 -0500
@@ -0,0 +1,120 @@
+Bug#: 80329
+Product: Mono: Class Libraries
+Version: 1.2
+OS: SUSE 9.2
+OS Details: Suse 9.3 with Pentium4 2400
+Status: NEW
+Resolution:
+Severity: Unknown
+Priority: Critical
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: Moritz.Kroll at gmx.de
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: TermInfoDriver buffer overflows after 1025 keystrokes
+
+Description of Problem:
+If you type 1025 characters at total during one Mono session in a console
+under Linux, the application crashes with a IndexOutOfRangeException if
+the input has been read using for example Console.ReadLine.
+
+Steps to reproduce the problem:
+
+1. Execute the following program:
+--------------------
+using System;
+
+namespace MonoConsoleTest
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ while(true)
+ Console.ReadLine();
+ }
+ }
+}
+---------
+
+2. Paste the following text into the console (including the last linefeed):
+---------
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+---------
+
+3. Press one more key (say 'x')
+
+Actual Results:
+
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+
+Unhandled Exception: System.IndexOutOfRangeException: Array index is out
+of range.
+ at System.TermInfoDriver.AddToBuffer (Int32 b) [0x00000]
+ at System.TermInfoDriver.ReadKeyInternal () [0x00000]
+ at System.TermInfoDriver.ReadLine () [0x00000]
+ at System.ConsoleDriver.ReadLine () [0x00000]
+ at System.Console.ReadLine () [0x00000]
+ at MonoConsoleTest.Program.Main (System.String[] args) [0x00000]
+
+
+Expected Results:
+
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
+x
+
+How often does this happen?
+Always
+
+Additional Information:
+
+Happens with Mono 1.1.18 and Mono 1.2.2.1 on Linux, but does not happen on
+Windows.
More information about the mono-bugs
mailing list