Author: zoltan
Date: 2005-05-13 05:31:11 -0400 (Fri, 13 May 2005)
New Revision: 44490
Modified:
trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog
trunk/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
trunk/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
Log:
2005-05-13 Zoltan Varga <[EMAIL PROTECTED]>
* ConstructorBuilder.cs MethodBuilder.cs: Check that elements of
parameterTypes are not null. Fixes #74928.
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog 2005-05-13
09:06:07 UTC (rev 44489)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog 2005-05-13
09:31:11 UTC (rev 44490)
@@ -1,3 +1,8 @@
+2005-05-13 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * ConstructorBuilder.cs MethodBuilder.cs: Check that elements of
+ parameterTypes are not null. Fixes #74928.
+
2005-05-12 Zoltan Varga <[EMAIL PROTECTED]>
* ConstructorBuilder.cs MethodBuilder.cs (fixup): Fix this.
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
2005-05-13 09:06:07 UTC (rev 44489)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
2005-05-13 09:31:11 UTC (rev 44490)
@@ -60,6 +60,10 @@
attrs = attributes | MethodAttributes.SpecialName |
MethodAttributes.RTSpecialName;
call_conv = callingConvention;
if (parameterTypes != null) {
+ for (int i = 0; i < parameterTypes.Length; ++i)
+ if (parameterTypes [i] == null)
+ throw new ArgumentException
("Elements of the parameterTypes array cannot be null", "parameterTypes");
+
this.parameters = new Type
[parameterTypes.Length];
System.Array.Copy (parameterTypes,
this.parameters, parameterTypes.Length);
}
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
2005-05-13 09:06:07 UTC (rev 44489)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
2005-05-13 09:31:11 UTC (rev 44490)
@@ -87,6 +87,10 @@
if ((attributes & MethodAttributes.Static) == 0)
this.call_conv |= CallingConventions.HasThis;
if (parameterTypes != null) {
+ for (int i = 0; i < parameterTypes.Length; ++i)
+ if (parameterTypes [i] == null)
+ throw new ArgumentException
("Elements of the parameterTypes array cannot be null", "parameterTypes");
+
this.parameters = new Type
[parameterTypes.Length];
System.Array.Copy (parameterTypes,
this.parameters, parameterTypes.Length);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches