Author: zoltan
Date: 2005-03-04 11:18:53 -0500 (Fri, 04 Mar 2005)
New Revision: 41449
Modified:
branches/mono-1-0/mono/mono/metadata/ChangeLog
branches/mono-1-0/mono/mono/metadata/object.c
Log:
Merge from HEAD.
Modified: branches/mono-1-0/mono/mono/metadata/ChangeLog
===================================================================
--- branches/mono-1-0/mono/mono/metadata/ChangeLog 2005-03-04 16:18:51 UTC
(rev 41448)
+++ branches/mono-1-0/mono/mono/metadata/ChangeLog 2005-03-04 16:18:53 UTC
(rev 41449)
@@ -1,3 +1,9 @@
+2005-03-04 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * object.c (mono_load_remote_field_new): Fix returning uninitialized
+ memory when the remoting callback does not sets the out arguments.
+ Fixes #73007.
+
2005-02-02 Zoltan Varga <[EMAIL PROTECTED]>
* object.c (mono_runtime_get_main_args): Fix stupid typo.
Modified: branches/mono-1-0/mono/mono/metadata/object.c
===================================================================
--- branches/mono-1-0/mono/mono/metadata/object.c 2005-03-04 16:18:51 UTC
(rev 41448)
+++ branches/mono-1-0/mono/mono/metadata/object.c 2005-03-04 16:18:53 UTC
(rev 41449)
@@ -3037,6 +3037,9 @@
if (exc) mono_raise_exception ((MonoException *)exc);
+ if (mono_array_length (out_args) == 0)
+ return NULL;
+
*res = mono_array_get (out_args, MonoObject *, 0);
if (field_class->valuetype) {
@@ -3088,6 +3091,7 @@
msg = (MonoMethodMessage *)mono_object_new (domain,
mono_defaults.mono_method_message_class);
out_args = mono_array_new (domain, mono_defaults.object_class, 1);
+
mono_message_init (domain, msg, mono_method_get_object (domain, getter,
NULL), out_args);
mono_array_set (msg->args, gpointer, 0, mono_string_new (domain,
klass->name));
@@ -3097,7 +3101,10 @@
if (exc) mono_raise_exception ((MonoException *)exc);
- res = mono_array_get (out_args, MonoObject *, 0);
+ if (mono_array_length (out_args) == 0)
+ res = NULL;
+ else
+ res = mono_array_get (out_args, MonoObject *, 0);
return res;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches