Skip to content

Uninitialized boolean variable in bgpd/bgp_vty.c #19231

@arinochk

Description

@arinochk

A static analyzer has found an issue where the boolean variable af_cfgd in the bgp_show_one_peer_group function in bgpd/bgp_vty.c is uninitialized, leaving its value undefined.
declaration of variable af_cfgd bgpd/bgp_vty.c L17464
Only on line 17528, when the condition is met, the variable af_cfgd is assigned the value true. if the condition is not met, then no value is assigned to the af_cfgd variable. assigning the variable af_cfgd the value true bgpd/bgp_vty.c L17528
The value false for the variable af_cfgd is not assigned anywhere. And on line 17545, the variable af_cfgd is used.
Using a variable af_cfgd bgpd/bgp_vty.c  L17545

Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions