diff options
author | Eiichiro Watanabe <a16tochjp@gmail.com> | 2019-03-21 15:57:49 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-03-21 22:41:05 +0900 |
commit | 15f0c50a61711c46357d369bbef60016ced7bbb2 (patch) | |
tree | f83a6d6ff5d3fde0d518be49ddd57cb7252750ae /pkg | |
parent | 344f053729fa0f742ba949a863d5b40b11275667 (diff) |
pkg/packet/bgp: avoid crash when receiving an update with invalid AS_PATH len
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/packet/bgp/bgp.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/packet/bgp/bgp.go b/pkg/packet/bgp/bgp.go index c66d4a70..9a1af06b 100644 --- a/pkg/packet/bgp/bgp.go +++ b/pkg/packet/bgp/bgp.go @@ -12318,6 +12318,7 @@ func (msg *BGPUpdate) DecodeFromBytes(data []byte, options ...*MarshallingOption if e.(*MessageError).Stronger(strongestError) { strongestError = e } + return strongestError } data = data[p.Len(options...):] if e == nil || e.(*MessageError).ErrorHandling != ERROR_HANDLING_ATTRIBUTE_DISCARD { |