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 #1855 #1870

Merged
merged 2 commits into from
Jan 27, 2023
Merged

Fix #1855 #1870

merged 2 commits into from
Jan 27, 2023

Conversation

plusvic
Copy link
Member

@plusvic plusvic commented Jan 27, 2023

Fix one of the issues reported in #1855. Not of all them have been fixed, though.

PR #1768 added RVA field to function details in PE module. The new code had the following line:

```
rva_address =  yr_le64toh(import_descriptor->FirstThunk + (sizeof(uint64_t) * func_idx));
```

The `yr_le64toh` should be used for converting the value of `import_descriptor->FirstThunk` from little-endian to the host's endianness *before* performing the add operation. However, the addition was performed before the conversion.

This may be the cause of some test cases failing in big endian platforms.
@plusvic plusvic merged commit 2b631d0 into master Jan 27, 2023
@plusvic plusvic deleted the fix_1855 branch February 8, 2023 12:02
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.

1 participant