diff --git a/veilid-core/src/veilid_api/types/dht/schema/smpl.rs b/veilid-core/src/veilid_api/types/dht/schema/smpl.rs index f1079a53..572b93e8 100644 --- a/veilid-core/src/veilid_api/types/dht/schema/smpl.rs +++ b/veilid-core/src/veilid_api/types/dht/schema/smpl.rs @@ -96,7 +96,7 @@ impl DHTSchemaSMPL { impl TryFrom<&[u8]> for DHTSchemaSMPL { type Error = VeilidAPIError; fn try_from(b: &[u8]) -> Result { - if b.len() < 4 { + if b.len() < Self::FIXED_SIZE { apibail_generic!("invalid size"); } if &b[0..4] != &Self::FCC {