icmp: fix out-of-bounds read in parseTimeExceeded
diff --git a/icmp/timeexceeded.go b/icmp/timeexceeded.go
index ffa986f..914f5e3 100644
--- a/icmp/timeexceeded.go
+++ b/icmp/timeexceeded.go
@@ -44,7 +44,7 @@
// parseTimeExceeded parses b as an ICMP time exceeded message body.
func parseTimeExceeded(proto int, typ Type, b []byte) (MessageBody, error) {
- if len(b) < 4 {
+ if len(b) < 8 {
return nil, errMessageTooShort
}
p := &TimeExceeded{}
@@ -55,3 +55,4 @@
}
return p, nil
}
+
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |