summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp.go
diff options
context:
space:
mode:
Diffstat (limited to 'packet/bgp.go')
-rw-r--r--packet/bgp.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/packet/bgp.go b/packet/bgp.go
index 173d7698..cc2166c2 100644
--- a/packet/bgp.go
+++ b/packet/bgp.go
@@ -1295,7 +1295,7 @@ func (a *As4PathParam) DecodeFromBytes(data []byte) error {
a.Type = data[0]
a.Num = data[1]
data = data[2:]
- if len(data) < int(a.Num*4) {
+ if len(data) < int(a.Num)*4 {
return NewMessageError(eCode, eSubCode, nil, "AS4 param data length is short")
}
for i := 0; i < int(a.Num); i++ {