| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
In SMBIOS 3.0+ (64-bit entry point), table data is sized using StructMaxSize, leaving trailing buffer padding after TableTypeEndOfTable (Type 127). ParseInfo previously ignored errEndOfTable and continued parsing remainder bytes, leading to io.ErrUnexpectedEOF. Terminate the loop upon encountering errEndOfTable while appending the record. Signed-off-by: Patrick Venture <venture@google.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #3769 +/- ##
==========================================
- Coverage 61.46% 61.31% -0.15%
==========================================
Files 648 648
Lines 45716 45719 +3
==========================================
- Hits 28099 28033 -66
- Misses 17617 17686 +69
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Sorry, something went wrong.
|
so the patch has my signature line. Not sure what's failing now... |
Sorry, something went wrong.
There was a problem hiding this comment.
thanks. So, Patrick, first time here? Nice to see you here.
Sorry, something went wrong.
|
I set dco to pass. I don't see the issue either. |
Sorry, something went wrong.
There was a problem hiding this comment.
The padded StructMaxSize behavior needs a targeted regression test.
Review effort: Balanced
Findings: 1
Updates SMBIOS parsing to stop cleanly at the Type 127 end marker while preserving that record.
Changes:
| File | Description |
|---|---|
| pkg/smbios/info.go | Handles errEndOfTable as successful termination. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
| if err == errEndOfTable { | ||
| info.Tables = append(info.Tables, t) | ||
| break |
|
how do you feel about letting copilot write the regression test for this change? |
Sorry, something went wrong.
Sure, I don't see a button to engage it. Please advise. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
In SMBIOS 3.0+ (64-bit entry point), table data is sized using StructMaxSize, leaving trailing buffer padding after TableTypeEndOfTable (Type 127). ParseInfo previously ignored errEndOfTable and continued parsing remainder bytes, leading to io.ErrUnexpectedEOF.
Terminate the loop upon encountering errEndOfTable while appending the record.