Merge branch 'tek/fix-smpl-tryfrom-check' into 'main'
This commit is contained in:
commit
d038b74e69
@ -96,7 +96,7 @@ impl DHTSchemaSMPL {
|
||||
impl TryFrom<&[u8]> for DHTSchemaSMPL {
|
||||
type Error = VeilidAPIError;
|
||||
fn try_from(b: &[u8]) -> Result<Self, Self::Error> {
|
||||
if b.len() != Self::FIXED_SIZE {
|
||||
if b.len() < Self::FIXED_SIZE {
|
||||
apibail_generic!("invalid size");
|
||||
}
|
||||
if &b[0..4] != &Self::FCC {
|
||||
|
Loading…
Reference in New Issue
Block a user