From a8a1346c9898283eb46fb9bc1059561a413dc6dc Mon Sep 17 00:00:00 2001 From: lubeilin <1791778603@qq.com> Date: Tue, 5 Mar 2024 21:36:12 +0800 Subject: [PATCH] =?UTF-8?q?[mio]=20=E4=BD=BF=E7=94=A8=E5=AE=9E=E9=99=85?= =?UTF-8?q?=E9=95=BF=E5=BA=A6=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnt/src/protocol/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vnt/src/protocol/mod.rs b/vnt/src/protocol/mod.rs index 7c57ede..8cc187d 100644 --- a/vnt/src/protocol/mod.rs +++ b/vnt/src/protocol/mod.rs @@ -123,7 +123,7 @@ impl> NetPacket { )); } // 不能大于udp最大载荷长度 - if data_len < 12 || buffer.as_ref().len() > 65535 - 20 - 8 { + if data_len < 12 || data_len > 65535 - 20 - 8 { return Err(io::Error::new( io::ErrorKind::InvalidData, "length overflow",