You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(proto): bounds-check slicing flagged by clippy::indexing_slicing
Replace direct slice / index access with `.get()`, `split_first`,
`split_at`, or iterator-based equivalents in CTAP message parsing and
PIN/UV helpers. Functions affected:
- `fido::AuthenticatorData::deserialize`: bound the trailing-data check.
- `pin::PinUvAuthProtocolOne::authenticate`: handle the (impossible in
practice) case of an HMAC output shorter than 16 bytes.
- `pin::pin_hash`: use iterator `take(16)` on the SHA-256 output.
- `proto::ctap1::apdu::ApduResponse::try_from`: rewrite using
`checked_sub` and `split_at` so an empty / 1-byte packet errors out.
- `proto::ctap1::model`: bound the U2F register-response signature
split via `checked_sub`.
- `proto::ctap2::cbor::CborResponse::try_from`: rewrite using
`split_first`.
- `proto::ctap2::model::get_assertion`: convert SHA-256 outputs to
`[u8; 32]` via `GenericArray::into` and use `first()` on the
allowList shortcut.
0 commit comments