CAIDA / libparsebgp

Lightweight parser for binary BGP, BMP and MRT routing data
https://bgpstream.caida.org
BSD 2-Clause "Simplified" License
8 stars 8 forks source link

Fix core in parsebgp_bgp_open_clear() #51

Closed kenkeys closed 5 years ago

kenkeys commented 5 years ago

Avoid crash in parsebgpbgp{open,notification,route_refresh}_clear() by checking for null parameter (actually observed in parsebgp_bgp_open_clear() after truncated message, but may have been possible in the other functions in similar situations).

digizeph commented 5 years ago

Can confirm both https://github.com/CAIDA/libparsebgp/issues/49#issuecomment-485567437 and https://github.com/CAIDA/libparsebgp/issues/49#issuecomment-485032949 can be resolved by this PR.