diff options
Diffstat (limited to 'isisd/isis_spf.c')
| -rw-r--r-- | isisd/isis_spf.c | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index 2e2933db33..556f2890cf 100644 --- a/isisd/isis_spf.c +++ b/isisd/isis_spf.c @@ -1473,8 +1473,9 @@ static void isis_print_paths(struct vty *vty, struct isis_vertex_queue *queue,  		vty_out(vty, "%-20s %-12s %-6u ",  			vid2string(vertex, buff, sizeof(buff)),  			vtype2string(vertex->type), vertex->d_N); -		for (unsigned int i = 0; i < MAX(listcount(vertex->Adj_N), -						 listcount(vertex->parents)); +		for (unsigned int i = 0; +		     i < MAX(vertex->Adj_N ? listcount(vertex->Adj_N) : 0, +			     vertex->parents ? listcount(vertex->parents) : 0);  		     i++) {  			if (anode) {  				adj = listgetdata(anode);  | 
