Skip to content

Commit

Permalink
2009-12-16 Zoltan Varga <vargaz@gmail.com>
Browse files Browse the repository at this point in the history
	* reflection.c (mono_custom_attrs_from_param): Avoid a crash if a dynamic
	param doesn't have custom attributes. Fixes #565117.

svn path=/branches/mono-2-6/mono/; revision=148561
  • Loading branch information
vargaz committed Dec 16, 2009
1 parent 0d60a16 commit 7f6e379
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mono/metadata/ChangeLog
@@ -1,3 +1,8 @@
2009-12-16 Zoltan Varga <vargaz@gmail.com>

* reflection.c (mono_custom_attrs_from_param): Avoid a crash if a dynamic
param doesn't have custom attributes. Fixes #565117.

2009-12-15 Rodrigo Kumpera <rkumpera@novell.com>

* class.c (mono_class_setup_fields): Fail valuetypes that are bigger than 1Mb.
Expand Down
2 changes: 2 additions & 0 deletions mono/metadata/reflection.c
Expand Up @@ -8421,6 +8421,8 @@ mono_custom_attrs_from_param (MonoMethod *method, guint32 param)

/* Need to copy since it will be freed later */
ainfo = aux->param_cattr [param];
if (!ainfo)
return NULL;
size = MONO_SIZEOF_CUSTOM_ATTR_INFO + sizeof (MonoCustomAttrEntry) * ainfo->num_attrs;
res = g_malloc0 (size);
memcpy (res, ainfo, size);
Expand Down

0 comments on commit 7f6e379

Please sign in to comment.