Skip to content

Check the issue 314 file rebases to an unchanged image - #648

Merged
j-t-1 merged 1 commit into
erocarrera:masterfrom
HuzaifaChaudary:tests/relocate-crash-file
Nov 6, 2026
Merged

j-t-1 merged 1 commit into
erocarrera:masterfrom
HuzaifaChaudary:tests/relocate-crash-file

Conversation

@HuzaifaChaudary

Copy link
Copy Markdown
Contributor

part of #584 .

the asserts on the 97 byte file from #314 were commented out with 0 != 60624 . 60624 is the count the MSVBVM60.DLL block had before #632 , and it came along when that block was copied for this file . the file has no data directories , so there is nothing to relocate , and radare2 finds no relocations either . so the count is 0 both ways .

this also drops the second count_differences and the copy of the load at the end . with the len() guard from #314 taken out of relocate_image() , the test fails with the IndexError from that issue .

i also checked the 61136 for MSVBVM60.DLL without pefile . the section table from radare2 and a separate walk of the .reloc blocks give 30568 HIGHLOW entries , and rebasing from 0x73420000 to 0x1000000 changes the top two bytes of each one , 61136 bytes .

the block for the 97 byte issue 314 file had its asserts commented out , they expected 60624 , which was the count for an older MSVBVM60.DLL . the file has no data directories , so there are no relocations to apply . radare2 finds none either , so the right count is 0 for both ways of rebasing .

this also drops the second count_differences and the copy of the load at the end . with the len() guard from erocarrera#314 taken out , the test fails with the IndexError from that issue .
Copilot AI balanced review requested due to automatic review settings November 3, 2026 13:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@j-t-1
j-t-1 merged commit 162b40a into erocarrera:master Nov 6, 2026
24 of 25 checks passed
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.

3 participants