Description:
DbcParser::ParseFrameLine() does not check whether required fields were successfully read. Malformed frame definitions can silently produce incorrect metadata.
Reproduction:
Input:
BO_ invalid
Expected: a parse error identifying the malformed frame definition and its line number.
Actual: parsing succeeds and creates a frame named BO_ with CAN ID 0 and payload length 0.
Scope:
Validate all required BO_ fields: CAN ID, frame name, colon delimiter, payload length, and transmitter.
Reject malformed numeric fields and values that would overflow or truncate during conversion.
Validate the normalized CAN ID against the 29-bit identifier range.
Include the file path and line number in parser error messages.
Add regression tests for valid standard/extended frames and malformed definitions.
Update README with the validation rules and error-reporting behavior.
Do not modify generated docs.
Acceptance criteria:
The reproduction case fails with a descriptive error containing the file path and line number.
Missing fields, malformed numbers, invalid identifiers, and payload lengths exceeding the storage type are rejected.
Existing valid frame definitions continue to parse correctly.
Parser and decoder regression tests pass.
The project builds without warnings using -Wall -Wextra -Wpedantic -Werror
Description:
DbcParser::ParseFrameLine() does not check whether required fields were successfully read. Malformed frame definitions can silently produce incorrect metadata.
Reproduction:
Input:
BO_ invalid
Expected: a parse error identifying the malformed frame definition and its line number.
Actual: parsing succeeds and creates a frame named BO_ with CAN ID 0 and payload length 0.
Scope:
- Validate all required BO_ fields: CAN ID, frame name, colon delimiter, payload length, and transmitter.
- Reject malformed numeric fields and values that would overflow or truncate during conversion.
- Validate the normalized CAN ID against the 29-bit identifier range.
- Include the file path and line number in parser error messages.
- Add regression tests for valid standard/extended frames and malformed definitions.
- Update README with the validation rules and error-reporting behavior.
- Do not modify generated docs.
Acceptance criteria:
- The reproduction case fails with a descriptive error containing the file path and line number.
- Missing fields, malformed numbers, invalid identifiers, and payload lengths exceeding the storage type are rejected.
- Existing valid frame definitions continue to parse correctly.
- Parser and decoder regression tests pass.
- The project builds without warnings using -Wall -Wextra -Wpedantic -Werror
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description:
DbcParser::ParseFrameLine() does not check whether required fields were successfully read. Malformed frame definitions can silently produce incorrect metadata.
Reproduction:
Input:
BO_ invalid
Expected: a parse error identifying the malformed frame definition and its line number.
Actual: parsing succeeds and creates a frame named BO_ with CAN ID 0 and payload length 0.
Scope:
Acceptance criteria: