UDPProto: Fixed index-out-of-bounds bug
This commit is contained in:
parent
b683c8a391
commit
898ebbecc7
|
@ -63,7 +63,7 @@ impl UdpProto
|
||||||
|
|
||||||
self.packet_offset += 7;
|
self.packet_offset += 7;
|
||||||
|
|
||||||
if self.packet_offset >= MAX_PACKET_LEN {
|
if self.packet_offset >= MAX_PACKET_LEN-7 {
|
||||||
self.send_packet()?;
|
self.send_packet()?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue