-
Notifications
You must be signed in to change notification settings - Fork 163
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
PE: Assume AddressOfIndex
could not be in raw section, check callback is zero right after it reads from binary
#425
Conversation
…ck is zero right after it reads from binary
I think we can safely remove @m4b How about removing the |
I'm confused, didn't you just add this field in 6c5b3e8 ? I will merge this patch, thanks for posting it so quickly! Re removing the slot field, I'd really like to avoid churn as much as possible, specifically in context of breaking changes. I know we can't predict the future but for future patches, try considering how breaking change could be avoided, or if a field/function really needs to be While we're talking about that, I will likely deprecate the I think a more goblin-idiomatic way to do it (on hindsight) would have been to write: ImageTlsDirectory
ImageTlsDirectory32 and then write: impl From<ImageTlsDirectory32> for ImageTlsDirectory {} and then in the parse mechanism, if we're passed e.g., is_64 or whatever, we simply do: let tls_directory = if is_64 { parse::<ImageTlsDirectory>() } else { parse::<ImageTlsDirectory32>().into() } this alas will be a breaking change since the parse uses generics right now; anyway something to fix in the 0.10 release, and it's fairly minor. anyway thanks for this fix! |
Yes I did. Some binaries has |
I guess this fixed #411 too? |
AddressOfIndex
only exists in virtual address caused Malformed error by simply not raising explicit error but set theslot
field toNone
.callback
terminator check must be right before it reads from the raw binary. Otherwise it overflows when subtracting by image base.