Author: stephane
Date: 2007-12-20 08:02:53 -0500 (Thu, 20 Dec 2007)
New Revision: 91701
Added:
trunk/mcs/class/System.Core/System/ChangeLog
Modified:
trunk/mcs/class/System.Core/System/TimeZoneInfo.cs
Log:
2007-12-20 Stephane Delcroix <[EMAIL PROTECTED]>
* TimeZoneInfo.cs: adapting length check to parse TZif2 files
introduced by glibc 2.6.x.
Added: trunk/mcs/class/System.Core/System/ChangeLog
===================================================================
--- trunk/mcs/class/System.Core/System/ChangeLog 2007-12-20 13:02:47 UTC
(rev 91700)
+++ trunk/mcs/class/System.Core/System/ChangeLog 2007-12-20 13:02:53 UTC
(rev 91701)
@@ -0,0 +1,4 @@
+2007-12-20 Stephane Delcroix <[EMAIL PROTECTED]>
+
+ * TimeZoneInfo.cs: adapting length check to parse TZif2 files
+ introduced by glibc 2.6.x.
Modified: trunk/mcs/class/System.Core/System/TimeZoneInfo.cs
===================================================================
--- trunk/mcs/class/System.Core/System/TimeZoneInfo.cs 2007-12-20 13:02:47 UTC
(rev 91700)
+++ trunk/mcs/class/System.Core/System/TimeZoneInfo.cs 2007-12-20 13:02:53 UTC
(rev 91701)
@@ -657,7 +657,7 @@
int typecnt = enc.GetInt32 (buffer, 36);
int charcnt = enc.GetInt32 (buffer, 40);
- if (length != 44 + timecnt * 5 + typecnt * 6 + charcnt
+ leapcnt * 8 + ttisstdcnt + ttisgmtcnt)
+ if (length < 44 + timecnt * 5 + typecnt * 6 + charcnt +
leapcnt * 8 + ttisstdcnt + ttisgmtcnt)
throw new InvalidTimeZoneException ();
Hashtable abbreviations = ParseAbbreviations (buffer,
44 + 4 * timecnt + timecnt + 6 * typecnt, charcnt);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches