Automate check_parser_state in BoxIter loops
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reading mp4parse/src/macros.rs and searching for BoxIter loops that call iter.next_box() and check_parser_state!. Trace how box contents are consumed and determine where automation could enforce the convention. Done means the relevant loops are checked automatically and existing parser behavior remains covered by the repository's tests.
Written by the indexing model from the issue text.
Description
By convention, the check_parser_state macro is called at the end of while loops for iterating over BMFFBox's sub boxes with BoxIter like so:
let mut iter = src.box_iter();
while let Some(mut b) = iter.next_box()? {
// read or skip all the contents of `b`
check_parser_state!(b.content);
}
This helps to surface the situation of failing to read boxes in their entirety either due to logic errors or malformed input. However, it can be easy to forget to add the check_parser_state macro in the appropriate place, so some form of automation would improve the robustness of the codebase.
- Dominant language
- Rust
- Stars
- 448
- Forks
- 72
- Avg merge
- 20d 3h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mozilla/mp4parse-rust
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
mozilla/mp4parse-rust#444 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
mozilla/mp4parse-rust#441 ·
-
senc box Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
mozilla/mp4parse-rust#415 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
mozilla/mp4parse-rust#414 · 4 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
mozilla/mp4parse-rust#412 · 2 comments ·
All issues in mozilla/mp4parse-rust
Similar issues
-
bug CLI custom-model
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fulcrumgenomics/ferro-hgvs#2251 ·
-
A-allocators A-docs C-enhancement T-libs
Difficulty 2/5 1-3 hours Newbie friendliness 75/100