Repository navigation
fix(skeletons): pad short BIT STRING values to a fixed JER size - #618
Merged
mouse07410 merged 2 commits intoNov 19, 2026
Merged
Conversation
A BIT STRING with SIZE(8) is eight bits wide, but a value such as one decoded from BER can carry trailing zero bits in a compact form: one significant bit with seven insignificant zeros. The JER encoder compared the one-bit width with the required eight and rejected the value instead of padding it, so re-encoding that value to JER failed while XER and BER handled it. Accept a value whose meaningful bits fit the fixed size and emit the full width, zero-filled. A value whose declared width exceeds the size is still rejected. The fixed-size cases in check-JER cover one-bit and full-byte values, widths 8/16/9, a non-byte-aligned value, the empty value, the two rejections, a callback failure and a decode/re-encode round trip.
Honor X.697 24.2.2 by padding or trimming only trailing zeros for NamedBitList types. Preserve JER SIZE metadata through type references, recognize equivalent named-bit values during strict validation, and exercise generated C and Rust boundaries.
1 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A BIT STRING with SIZE(8) is eight bits wide, but a value such as one decoded from BER can carry trailing zero bits in a compact form: one significant bit with seven insignificant zeros. The JER encoder compared the one-bit width with the required eight and rejected the value instead of padding it, so re-encoding that value to JER failed while XER and BER handled it.
Accept a value whose meaningful bits fit the fixed size and emit the full width, zero-filled. A value whose declared width exceeds the size is still rejected. The fixed-size cases in check-JER cover one-bit and full-byte values, widths 8/16/9, a non-byte-aligned value, the empty value, the two rejections, a callback failure and a decode/re-encode round trip.
Fixes #617