[Mono-bugs] [Bug 41684][Nor] New - ArrayList.ValidateRange is wrong

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Mon, 21 Apr 2003 19:20:54 -0400 (EDT)


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 bernard@ugsolutions.com.

http://bugzilla.ximian.com/show_bug.cgi?id=41684

--- shadow/41684	Mon Apr 21 19:20:54 2003
+++ shadow/41684.tmp.1932	Mon Apr 21 19:20:54 2003
@@ -0,0 +1,32 @@
+Bug#: 41684
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: All
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bernard@ugsolutions.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: ArrayList.ValidateRange is wrong
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+
+ArrayList.ValidateRange is wrong. I believe the check:
+
+			if (index + count > this.count - 1) {
+				throw new ArgumentException();
+			}
+
+should be:
+			if (index + count > this.count) {
+				throw new ArgumentException();
+			}