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

frutool assumes "true" for section if "include" option is missing #21

Closed
MichaelLettrich opened this issue Jul 29, 2024 · 2 comments · Fixed by #24
Closed

frutool assumes "true" for section if "include" option is missing #21

MichaelLettrich opened this issue Jul 29, 2024 · 2 comments · Fixed by #24
Assignees

Comments

@MichaelLettrich
Copy link

Version: 4.0.1 (pip)

Problem:
In the common section, there are options to control which sections are included in the FRU file, starting with include_. If one of those include_ statements is removed, the tool assumes the removed include statement is "true". As a result, the header of the fru binary contains offsets to those FRU-sections, and blank FRU sections are inserted at those fields. This results in an invalid FRU.

Reproducer:
The issue can be reproduced with the following toml configuration.

[common]
format_version = 1
size = 256 
include_board = true

[board]
format_version = 1
language_code = 0

mfg_date_time = "2024-01-01 01:01"
manufacturer = "Test Factory .Inc"
product_name = "Test Board"
serial_number = "01234"
part_number = "5678"
fru_file_id = "1"
custom_fields = ["", ""]

I did not do any in-depth investigation in the source-code, but if you would like me to help with the fix, let me know.

@kurtmckee kurtmckee self-assigned this Aug 4, 2024
kurtmckee added a commit to kurtmckee/pr-fru-tool that referenced this issue Aug 4, 2024
@MichaelLettrich
Copy link
Author

@kurtmckee, thanks for taking care of this; it's really appreciated!

@kurtmckee
Copy link
Collaborator

You're welcome! v4.0.2 was released and should address this. 🥳

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 a pull request may close this issue.

2 participants