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

64bit ImageBase being truncated to 32bit #12

Closed
xchgrbprsp opened this issue Feb 3, 2017 · 3 comments
Closed

64bit ImageBase being truncated to 32bit #12

xchgrbprsp opened this issue Feb 3, 2017 · 3 comments

Comments

@xchgrbprsp
Copy link

In pe_header::process_disk_image method, I see _header_pe64->OptionalHeader.ImageBase = (DWORD) _original_base;, which I believe is wrong since the ImageBase for 64bit header is indeed a 64bit value so it should be _header_pe64->OptionalHeader.ImageBase = reinterpret_cast<__int64>(_original_base);.

I had this weird problem for a long time that the ImageBase is somehow truncated but I didn't realize it might be a bug. Now I think I found out what the problem was and it seems to be fixed by the change mentioned above.

@xchgrbprsp xchgrbprsp changed the title Truncating 64bit ImageBase to 32bit 64bit ImageBase being truncated to 32bit Feb 3, 2017
@glmcdona
Copy link
Owner

glmcdona commented Feb 3, 2017

Thanks for discovering this one! Will apply the above fix and give credits to you :)

@evanpjensen
Copy link

Ran into this issue today.

glmcdona pushed a commit that referenced this issue Feb 12, 2017
addresses. Thanks to megastupidmonkey who reported this issue and suggested the
fix.
@glmcdona
Copy link
Owner

glmcdona commented Feb 12, 2017

Thanks megastupidmonkey and wontonSlim. I've fixed this issue using your exact code megastupidmonkey, appreciate you taking the time to report and fix these issues. Feel free to submit push requests with the fixes as well, that way you can get official tracking of your contributions :) Working on your other bug now, will release a new built binary after I've got it fixed.

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

No branches or pull requests

3 participants