descriptor: reject fields in extension ranges - #420
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
# Conflicts: # buffa-descriptor/src/pool.rs
…ename the variant Review follow-ups: the hand-rolled sweep is replaced by the existing ReservedRanges index (binary search per field, no clone of the range list, field_by_number keeps its original sort site); the variant is FieldNumberInExtensionRange to parallel ReservedMessageFieldNumber; the tests use the proto2 set-level helper and add second-range and between-ranges cases; the fragment follows the house shape and cites the PR. Merged main; the DescriptorPool::new/decode error summaries keep main's wording pending a single rewrite after this series.
|
[claude code] With the sibling PRs going into 0.10.0 and no push here since 09-03, I've applied the review follow-ups myself (dafcfca): merged |
What changed
Why
A hand-built or untrusted descriptor set could load a message field in a number reserved for extensions.
Tests
cargo test --workspace --all-featurescargo clippy -p buffa-descriptor --all-targets --all-features -- -D warningscargo fmt --all --check