From f64bc7f8f799cb5045bfd1a808517f999b4ce496 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Mon, 16 Feb 2015 15:03:32 +0900 Subject: packet: fix AS4PathParam parser type conversion Signed-off-by: FUJITA Tomonori --- packet/bgp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packet') 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++ { -- cgit v1.2.3