Author: raja
Date: 2006-11-09 06:46:10 -0500 (Thu, 09 Nov 2006)
New Revision: 67589

Modified:
   trunk/mono/mono/metadata/ChangeLog
   trunk/mono/mono/metadata/assembly.c
Log:
Fix #79872
* assembly.c (mono_assembly_load_from_full): Check that the given
image has an assembly manifest.


Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog  2006-11-09 11:38:53 UTC (rev 67588)
+++ trunk/mono/mono/metadata/ChangeLog  2006-11-09 11:46:10 UTC (rev 67589)
@@ -1,3 +1,9 @@
+2006-11-09  Raja R Harinath  <[EMAIL PROTECTED]>
+
+       Fix #79872
+       * assembly.c (mono_assembly_load_from_full): Check that the given
+       image has an assembly manifest.
+
 2006-11-09  Ankit Jain  <[EMAIL PROTECTED]>
 
        * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):

Modified: trunk/mono/mono/metadata/assembly.c
===================================================================
--- trunk/mono/mono/metadata/assembly.c 2006-11-09 11:38:53 UTC (rev 67588)
+++ trunk/mono/mono/metadata/assembly.c 2006-11-09 11:46:10 UTC (rev 67589)
@@ -1380,6 +1380,13 @@
        GList *loading;
        GHashTable *ass_loading;
 
+       if (!image->tables [MONO_TABLE_ASSEMBLY].rows) {
+               /* 'image' doesn't have a manifest -- maybe someone is trying 
to Assembly.Load a .netmodule */
+               *status = MONO_IMAGE_IMAGE_INVALID;
+               return NULL;
+       }
+
+
 #if defined (PLATFORM_WIN32)
        {
                gchar *tmp_fn;

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

Reply via email to