Open qux-bbb opened 8 months ago
I want to understand better what is the reason for this change? does it mirror the behavior of the OS or is it simply to keep it "clean" of the values outside the header?
I have the recollection (but I have not verified it) that the OS does not clear the values when mapping the file into memory. pefile
attempts to mirror that behavior.
This change want to mirror the behavior of the OS.
The OS just maps PE file to memory. For mapped header, it does not contain latter data.
But before this commit, pefile
will map latter data to header in memory.
Before this changing, some non b"\0" data will be copied to the header.
After this changing, the header will be clear.