2010-06-20 Jb Evain <jbevain@novell.com>
authorJb Evain <jbevain@gmail.com>
Sun, 20 Jun 2010 13:14:29 +0000 (13:14 -0000)
committerJb Evain <jbevain@gmail.com>
Sun, 20 Jun 2010 13:14:29 +0000 (13:14 -0000)
* metadata-verify.c: do not consider the assembly invalid if it
doesn't have a #Blob stream as resource assemblies don't
necessarily have one.

svn path=/trunk/mono/; revision=159181

mono/metadata/ChangeLog
mono/metadata/metadata-verify.c

index 2c1559444d18fc3db6358ca973ac0fb999c560e1..6f7d17e603bcd2e4452d3d53673266e97c170ce9 100644 (file)
@@ -1,3 +1,9 @@
+2010-06-20  Jb Evain  <jbevain@novell.com>
+
+       * metadata-verify.c: do not consider the assembly invalid if it
+       doesn't have a #Blob stream as resource assemblies don't
+       necessarily have one.
+
 2010-06-17  Geoff Norton  <gnorton@novell.com>
 
        * sgen-archdep.h: sgen support for arm linux and darwin.
index 625692c77732cfc5f2fc740bb54b52c77a0d57b2..e37ef43a0245f8e4ee7bb487bf4ca7532e0b7015 100644 (file)
@@ -780,8 +780,8 @@ verify_metadata_header (VerifyContext *ctx)
        ptr = ctx->data + offset; //move to streams header 
 
        section_count = read16 (ptr + 2);
-       if (section_count < 3)
-               ADD_ERROR (ctx, g_strdup_printf ("Metadata root section must have at least 3 streams (#~, #GUID and #Blob"));
+       if (section_count < 2)
+               ADD_ERROR (ctx, g_strdup_printf ("Metadata root section must have at least 2 streams (#~ and #GUID)"));
 
        ptr += 4;
        offset += 4;
@@ -843,9 +843,6 @@ verify_metadata_header (VerifyContext *ctx)
                ADD_ERROR (ctx, g_strdup_printf ("Metadata #~ stream missing"));
        if (!ctx->metadata_streams [GUID_STREAM].size)
                ADD_ERROR (ctx, g_strdup_printf ("Metadata guid stream missing"));
-       if (!ctx->metadata_streams [BLOB_STREAM].size)
-               ADD_ERROR (ctx, g_strdup_printf ("Metadata blob stream missing"));
-               
 }
 
 static void