Merge branch 'tek/fix-smpl-tryfrom-check' into 'main'

This commit is contained in:
Christien Rioux 2023-07-25 16:49:22 +00:00
commit d038b74e69

View File

@ -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 {