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

PE: TLS parser rework #435

Merged
merged 2 commits into from
Jan 13, 2025
Merged

PE: TLS parser rework #435

merged 2 commits into from
Jan 13, 2025

Conversation

kkent030315
Copy link
Contributor

@kkent030315 kkent030315 commented Nov 10, 2024

Changelists:

  • Removed generics from ImageTlsDirectory::parse* and TlsData::parse*, instead added new argument is_64 as proposed in the issue.
  • Added slice bound check in TlsData::raw_data parser to compliant with panic-free design in goblin.

I personally prefer not making ImageTlsDirectory32―as it's more comfortable than the way duplicating the same kind of structs and merging to 64-bit as proposed in the issue.

This change should be marked as breaking-change and I expect this to be rolled up in 0.10.

@kkent030315 kkent030315 mentioned this pull request Nov 10, 2024
17 tasks
Copy link
Owner

@m4b m4b left a comment

Choose a reason for hiding this comment

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

this looks good, but I don't see where is_64 gets computed? i only see it passed to parse_with_opts ?

@kkent030315
Copy link
Contributor Author

@m4b is_64 is already computed in PE::parse_with_opts and passed straight to the TlsData::parse_with_opts.

Copy link
Owner

@m4b m4b left a comment

Choose a reason for hiding this comment

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

thank you for making these changes, the public api is more idiomatic again

@m4b m4b merged commit b3a80fd into m4b:master Jan 13, 2025
6 checks passed
@m4b
Copy link
Owner

m4b commented Jan 13, 2025

NB: breaking change

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.

2 participants