mirror of
https://github.com/freemkv/libfreemkv.git
synced 2026-10-07 18:13:10 +00:00
Security - Remove the unsafe Vec::set_len over recycled sector buffers — UB reachable from safe code (GHSA-j8ww-f5fg-9pmh, low). Uses Vec::resize; pooling unchanged. CI / tooling - clippy on stable with the MSRV single-sourced from Cargo.toml; cargo-deny dependency-audit gate with first-party git sources allowed (#15); audience-based comment-guard (#17). Docs - README (keydb ownership, BD-J parser count), drive-access transport/reset notes, mux timeline module-doc links.
600 B
600 B
BitReader (mux/codec/startcode.rs)
Minimal MSB-first bit reader over an RBSP, for the leading fields of a coded
slice header (H.264 first_mb_in_slice + slice_type; HEVC
slice_segment_header).
It does NOT remove emulation-prevention bytes (00 00 03). Those can only
appear after two consecutive 0x00 bytes, which cannot occur within the
first Exp-Golomb codes of a slice header (a slice header never begins
00 00), so the leading fields this reader is used for decode correctly. A
caller reading deep enough into a header that 00 00 03 could appear must
de-emulate the RBSP first.