File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
source/MetadataProcessor.Core Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,12 @@ public void Write(
66
66
{
67
67
// this replicates the original struct CLR_RECORD_ASSEMBLY
68
68
69
+ // marker
69
70
writer . WriteString ( c_NFAssemblyMarker_v1 ) ;
70
71
72
+ // need to set position because marker could be shorter
73
+ writer . BaseStream . Seek ( c_HeaderCrc32Position , SeekOrigin . Begin ) ;
74
+
71
75
// header CRC32
72
76
writer . WriteUInt32 ( 0 ) ;
73
77
@@ -79,12 +83,7 @@ public void Write(
79
83
writer . WriteUInt32 ( 0 ) ;
80
84
81
85
// native methods CRC32
82
- writer . WriteUInt32 ( writer . IsBigEndian ? _context . NativeMethodsCrc . Current : 0x00 ) ;
83
-
84
- // the existing MDP seems to have a bug because it's adding an extra byte at this place in the struct
85
- // right between the NativeMethodsChecksum and PatchEntryOffset fields.
86
- //// need this here to pad the structure in order to have a PE exactly as the one being generated now
87
- //writer.WriteByte(0);
86
+ writer . WriteUInt32 ( writer . IsBigEndian ? _context . NativeMethodsCrc . Current : 0 ) ;
88
87
89
88
// Native methods offset
90
89
writer . WriteUInt32 ( 0xFFFFFFFF ) ;
You can’t perform that action at this time.
0 commit comments