fix(proto): reject packet lengths usize cannot represent

This commit is contained in:
Nils Andreas Svee committed 2026-08-12 20:05:01 +07:00
1 parent c833b0663d
commit 3845142d30
11 files changed
+102 -42

No files matched your search

+2
View File
@@ -30,6 +30,8 @@ pub enum ProtoError {
InvalidUtf8,
#[error("invalid enum value {value} for {name}")]
InvalidEnum { name: &'static str, value: i64 },
#[error("packet length {length} cannot be represented as a buffer length")]
PacketLengthUnrepresentable { 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")]