Is anybody actually using that code?
We have an issue with the following lines:
On Saturday, June 18, 2011 11:50:37 PM UTC+2, Florian wrote:
>
> Buffer.BlockCopy(empty, 0, byteArray,
> (int) guidSection.PointerToRawData, (int)
> guidSection.SizeOfRawData);
>
SizeOfRawData is the size of the entire section, not just the GUID part.
So it can zero the whole bytes array and we end up with equal hashes for
different assemblies.
Shouldn't it be
Buffer.BlockCopy(empty, 0, bytes, (int)Image.GuidHeap.Offset,
(int)Image.GuidHeap.Size);
if we want to just reset the GUID part of the section?
Stephan
--
--
mono-cecil