Author: spouliot
Date: 2007-05-25 09:34:32 -0400 (Fri, 25 May 2007)
New Revision: 77946

Modified:
   trunk/mono/mono/metadata/ChangeLog
   trunk/mono/mono/metadata/reflection.c
Log:
2007-05-25  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * reflection.c: HasSecurity can be present even if no specially 
        encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
        SecurityAttribute). Fix CAS regression tests on buildbot.



Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog  2007-05-25 13:26:01 UTC (rev 77945)
+++ trunk/mono/mono/metadata/ChangeLog  2007-05-25 13:34:32 UTC (rev 77946)
@@ -1,3 +1,9 @@
+2007-05-25  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * reflection.c: HasSecurity can be present even if no specially 
+       encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
+       SecurityAttribute). Fix CAS regression tests on buildbot.
+
 2007-05-24  Jonathan Chambers  <[EMAIL PROTECTED]>
 
        * appdomain.c: Add configure checks for header files.

Modified: trunk/mono/mono/metadata/reflection.c
===================================================================
--- trunk/mono/mono/metadata/reflection.c       2007-05-25 13:26:01 UTC (rev 
77945)
+++ trunk/mono/mono/metadata/reflection.c       2007-05-25 13:34:32 UTC (rev 
77946)
@@ -9831,12 +9831,17 @@
 static guint32
 mono_declsec_get_flags (MonoImage *image, guint32 token)
 {
-       guint32 index = mono_metadata_declsec_from_index (image, token);
+       int index = mono_metadata_declsec_from_index (image, token);
        MonoTableInfo *t = &image->tables [MONO_TABLE_DECLSECURITY];
        guint32 result = 0;
        guint32 action;
        int i;
 
+       /* HasSecurity can be present for other, not specially encoded, 
attributes,
+          e.g. SuppressUnmanagedCodeSecurityAttribute */
+       if (index < 0)
+               return 0;
+
        for (i = index; i < t->rows; i++) {
                guint32 cols [MONO_DECL_SECURITY_SIZE];
 

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

Reply via email to