Skip to content
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 iat #526

Closed
wants to merge 2 commits into from
Closed

Fix iat #526

wants to merge 2 commits into from

Conversation

Catminusminus
Copy link

This will be fix #523

Instead of this->binary_->section_from_offset(offset_imports), we use this->binary_->section_from_offset(original_import_offset) where auto original_import_offset = (*it_import_section)->pointerto_raw_data() after adding new_import_section.

This makes us get the original import section even if the "backward shift" (explained in #523 ) happens.

section_from_offset(original_import_offset) can return the previous section of original import section, so use (*it_import_section)->pointerto_raw_data() instead of original_import_offset. Additionally, we updated roffset_import.
We should get original_import_offset after adding new_import_section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reconstructing IAT many times can break PE files
1 participant