-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix get_memory_mapped_image copy much header data #385
Conversation
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? |
This change want to mirror the behavior of the OS. |
This change does not correctly handle the mapped data so far. |
Maybe I should find a sample to prove it. |
Hello, that would be great. It's always good to have cases for the test suite. |
Because I think that if padding_length < 0, then this is a header section. Isn't it? |
Just changing the initial contents of "mapped_data" should lead to the behavior you desire. I've made the change in commit 14a4c71. What do you think? |
14a4c71 |
Yes, out of curiosity I ran over all the files I use for my tests and there are a few with negative |
Before this changing, some non b"\0" data will be copied to the header.
After this changing, the header will be clear.