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 printing section names that are 8 bytes long #203

Merged
merged 1 commit into from Oct 20, 2023

Conversation

gerow
Copy link
Contributor

@gerow gerow commented Oct 19, 2023

pe_section_name accidentally replaces the last character in section names that are 8 bytes long with a NUL. This results in a section header name like .cmdline1 being printed as .cmdlin.

This addresses the off-by-one issue by ensuring we have a NUL at the end of our buffer (which is >= 9 bytes) instead putting it at the byte before the end.

pe_section_name accidentally replaces the last character in section
names that are 8 bytes long with a NUL. This results in a section header
name like `.cmdline`[1] being printed as `.cmdlin`.

This addresses the off-by-one issue by ensuring we have a NUL at the end
of our buffer (which is >= 9 bytes) instead putting it at the byte
before the end.

[1]: https://uapi-group.org/specifications/specs/unified_kernel_image/
@GoGoOtaku GoGoOtaku merged commit 25a5d31 into mentebinaria:master Oct 20, 2023
3 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.

None yet

2 participants