[Mono-bugs] [Bug 71201][Min] Changed - Mono emits wrong MSDOS Header in PE Files

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 12 Jan 2005 11:05:23 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by vargaz@gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=71201

--- shadow/71201	2005-01-12 09:12:13.000000000 -0500
+++ shadow/71201.tmp.11352	2005-01-12 11:05:22.000000000 -0500
@@ -1,14 +1,14 @@
 Bug#: 71201
 Product: Mono: Runtime
 Version: 1.1
-OS: 
+OS: unknown
 OS Details: 
-Status: NEW   
-Resolution: 
-Severity: 
+Status: RESOLVED   
+Resolution: FIXED
+Severity: Unknown
 Priority: Minor
 Component: misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: jb.evain@dotnetguru.org               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -44,6 +44,24 @@
 Always
 
 Additional Information:
 It's very strange, because the msdosheader seems to be well defined in
 mono/metadata/reflection.c, when correcting this, could the patch be
 attached please ?
+
+------- Additional Comments From vargaz@gmail.com  2005-01-12 11:05 -------
+Fixed in SVN.
+
+Index: reflection.c
+===================================================================
+--- reflection.c        (revision 38774)
++++ reflection.c        (working copy)
+@@ -4681,8 +4681,6 @@
+
+        /* back-patch info */
+        msdos = (MonoMSDOSHeader*)pefile->data;
+-       msdos->nlast_page = GUINT16_FROM_LE (file_offset & (512 - 1));
+-       msdos->npages = GUINT16_FROM_LE ((file_offset + (512 - 1)) / 512);
+        msdos->pe_offset = GUINT32_FROM_LE (sizeof (MonoMSDOSHeader));
+
+        header = (MonoDotNetHeader*)(pefile->data + header_start);
+