Author: kumpera
Date: 2007-06-11 20:18:42 -0400 (Mon, 11 Jun 2007)
New Revision: 79220

Modified:
   trunk/mono/mono/metadata/ChangeLog
   trunk/mono/mono/metadata/pedump.c
Log:
2007-06-11  Rodrigo Kumpera  <[EMAIL PROTECTED]>

        *pedump.c (main): return error code 4 if assembly cannot be loaded 
instead of segfaulting



Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog  2007-06-11 23:36:38 UTC (rev 79219)
+++ trunk/mono/mono/metadata/ChangeLog  2007-06-12 00:18:42 UTC (rev 79220)
@@ -1,3 +1,7 @@
+2007-06-11  Rodrigo Kumpera  <[EMAIL PROTECTED]>
+
+       *pedump.c (main): return error code 4 if assembly cannot be loaded 
instead of segfaulting
+
 2007-06-11  Raja R Harinath  <[EMAIL PROTECTED]>
 
        MonoGenericMethod on a diet

Modified: trunk/mono/mono/metadata/pedump.c
===================================================================
--- trunk/mono/mono/metadata/pedump.c   2007-06-11 23:36:38 UTC (rev 79219)
+++ trunk/mono/mono/metadata/pedump.c   2007-06-12 00:18:42 UTC (rev 79220)
@@ -444,7 +444,12 @@
                }
                mono_init (file);
                assembly = mono_assembly_open (file, NULL);
-               
+
+               if (!assembly) {
+                       g_print ("Could not open assembly %s\n", file);
+                       return 4;
+               }
+
                return dump_verify_info (assembly->image, f);
        } else
                mono_image_close (image);

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

Reply via email to