Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bgpd: fix crash when polling bgp4v2PathAttrTable
we have (gdb) p *path->attr->aspath $1 = {refcnt = 3, segments = 0x0, json = 0x0, str = 0x55723d0b7470 "", str_len = 0, asnotation = ASNOTATION_PLAIN} It looks like this aspath is empty, resulting in a size 0 and NULL pointer for path->attr->aspath->segments which leads to the SIGSEGV fixe: return 0 when segments is null. Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
- Loading branch information