diff options
| author | Francois Dumontet <francois.dumontet@6wind.com> | 2024-10-21 12:49:50 +0200 |
|---|---|---|
| committer | Francois Dumontet <francois.dumontet@6wind.com> | 2024-10-25 22:25:35 +0200 |
| commit | ee2f1b85cf95fcbfd0a54dc15b911f525e96b163 (patch) | |
| tree | dd1d91b0950ec39b5293d851a62dd3ccda476e75 /lib/agg_table.c | |
| parent | 3f446ecb6b58fc8aabb431975ab941c80513a4c7 (diff) | |
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>
Diffstat (limited to 'lib/agg_table.c')
0 files changed, 0 insertions, 0 deletions
