Handle zero-length uint, int and float encoding - #85
Closed
metamuffin wants to merge 1 commit into
Closed
Conversation
See RFC8794 section 7.{1,2,3}
kinetiknz
requested review from
ashleyz and
kinetiknz
and removed request for
ashleyz
June 11, 2026 20:42
kinetiknz
approved these changes
Jun 11, 2026
| if (r != 1) | ||
| return r; | ||
|
|
||
| if (length < sizeof(int64_t)) { |
Collaborator
There was a problem hiding this comment.
Now that ne_read_uint returns success for length == 0, this needs to bail early for length == 0 to avoid UB here.
I'll fix this when I merge the change.
| } value; | ||
| int r; | ||
|
|
||
| /* Length == 10 not implemented. */ |
Collaborator
There was a problem hiding this comment.
Makes sense to remove this, it was only ever mentioned in early Matroska specs.
Collaborator
|
Merged as 1c9936b |
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.
See https://bugzilla.mozilla.org/show_bug.cgi?id=2045549
I also removed the comment
/* Length == 10 not implemented. */as length 10 floats as invalid according to the RFC.The test media is 1 second of testsrc2 where the
Timestampelement of the first (only) cluster uses the zero-length uint encoding.