fix(proto): reject invalid echo packet lengths
This commit is contained in:
1 parent
d53dd7f406
commit
dfdc43292a
5 files changed
+68
-6
No files matched your search
@@ -28,6 +28,10 @@ pub enum ProtoError {
|
||||
InvalidUtf8,
|
||||
#[error("invalid enum value {value} for {name}")]
|
||||
InvalidEnum { name: &'static str, value: i64 },
|
||||
#[error("packet length must be non-negative, got {length}")]
|
||||
NegativePacketLength { length: i64 },
|
||||
#[error("parameter {tag} length is too large: {length} bytes")]
|
||||
ParameterLengthTooLarge { tag: u64, length: u64 },
|
||||
#[error("open reply has zero token without close flag")]
|
||||
ZeroToken,
|
||||
#[error("trailing or malformed parameter payload")]
|
||||
|
||||
Reference in new issue
Block a user