diff --git a/pkstrings/src/pkstring.rs b/pkstrings/src/pkstring.rs index 7d044e3..8c79768 100644 --- a/pkstrings/src/pkstring.rs +++ b/pkstrings/src/pkstring.rs @@ -162,7 +162,13 @@ impl TryFrom> for PKString { type Error = Error; fn try_from(data: Vec) -> Result { - PKString::try_from(data.as_slice()) + for ord in &data { + if ! in_range(*ord) { + return Err(Error::InvalidByte(*ord)) + } + } + + Ok(PKString(data)) } }