From 1fc0a7899a6f6c8494f2ac64a8e9f8a80c6048cb Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Sun, 26 Jul 2009 16:05:47 +0000 Subject: [PATCH] 2009-07-22 Jb Evain * monotouch_System.dll.sources: bring Process in. svn path=/trunk/mcs/; revision=138685 --- mcs/class/System/System.Collections.Generic/ChangeLog | 4 ++++ mcs/class/System/System.Collections.Generic/Stack.cs | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/mcs/class/System/System.Collections.Generic/ChangeLog b/mcs/class/System/System.Collections.Generic/ChangeLog index e03ed5c92c3..0bfc5fbdfd1 100644 --- a/mcs/class/System/System.Collections.Generic/ChangeLog +++ b/mcs/class/System/System.Collections.Generic/ChangeLog @@ -1,3 +1,7 @@ +2009-07-26 Miguel de Icaza + + * Stack.cs: Check arguments. + 2009-07-14 Gonzalo Paniagua Javier * SortedList.cs: the IComparar.Compare arguments were reversed. diff --git a/mcs/class/System/System.Collections.Generic/Stack.cs b/mcs/class/System/System.Collections.Generic/Stack.cs index 24e783374dd..6770831a9a3 100644 --- a/mcs/class/System/System.Collections.Generic/Stack.cs +++ b/mcs/class/System/System.Collections.Generic/Stack.cs @@ -92,6 +92,11 @@ namespace System.Collections.Generic public void CopyTo (T [] dest, int idx) { + if (dest == null) + throw new ArgumentNullException ("dest"); + if (idx < 0) + throw new ArgumentOutOfRangeException ("idx"); + // this gets copied in the order that it is poped if (_array != null) { Array.Copy (_array, 0, dest, idx, _size); -- 2.11.4.GIT