Author: igorz
Date: 2008-01-30 06:12:53 -0500 (Wed, 30 Jan 2008)
New Revision: 94366

Modified:
   trunk/mcs/class/System.Web/System.Web.UI/ChangeLog
   trunk/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs
Log:
2008-01-30 Igor Zelmanovich <[EMAIL PROTECTED]>

        * ObjectStateFormatter.cs: 
        ensure ReaderContext.GetCache called with positive arg to prevent from
        ArgumentOutOfRange being thrown.



Modified: trunk/mcs/class/System.Web/System.Web.UI/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/ChangeLog  2008-01-30 10:19:13 UTC 
(rev 94365)
+++ trunk/mcs/class/System.Web/System.Web.UI/ChangeLog  2008-01-30 11:12:53 UTC 
(rev 94366)
@@ -1,3 +1,9 @@
+2008-01-30 Igor Zelmanovich <[EMAIL PROTECTED]>
+
+       * ObjectStateFormatter.cs: 
+       ensure ReaderContext.GetCache called with positive arg to prevent from
+       ArgumentOutOfRange being thrown.
+
 2008-01-29 Igor Zelmanovich <[EMAIL PROTECTED]>
 
        * ObjectStateFormatter.cs: has public constructor.

Modified: trunk/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs    
2008-01-30 10:19:13 UTC (rev 94365)
+++ trunk/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs    
2008-01-30 11:12:53 UTC (rev 94366)
@@ -277,6 +277,9 @@
 
                        public bool RegisterCache (object o)
                        {
+                               if (nextKey == short.MaxValue)
+                                       return false;
+
                                if (cache == null) {
                                        cache = new Hashtable ();
                                        cache.Add (o, key = nextKey++);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to