mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-04 23:40:26 +08:00
fix out of bound
This commit is contained in:
@@ -163,7 +163,7 @@ func (m *Me) sendAllSameDst(packet []byte) (n int, rem []byte) {
|
||||
n += pktl
|
||||
rem = packet[n:]
|
||||
}
|
||||
if !waterutil.IsIPv4(rem) {
|
||||
if len(rem) == 0 || !waterutil.IsIPv4(rem) {
|
||||
logrus.Warnln("[me] skip to send", len(rem), "bytes non-ipv4/v6 packet")
|
||||
return len(packet), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user