From 898ebbecc7ab337be039b2b1959956d17a6dcf20 Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Thu, 18 Mar 2021 21:22:30 +0100 Subject: [PATCH] UDPProto: Fixed index-out-of-bounds bug --- src/udpproto.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/udpproto.rs b/src/udpproto.rs index 0b32478..52a2a64 100644 --- a/src/udpproto.rs +++ b/src/udpproto.rs @@ -63,7 +63,7 @@ impl UdpProto self.packet_offset += 7; - if self.packet_offset >= MAX_PACKET_LEN { + if self.packet_offset >= MAX_PACKET_LEN-7 { self.send_packet()?; }