-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib, zebra, pbrd, isisd, bgpd: fix static errors #17986
base: master
Are you sure you want to change the base?
lib, zebra, pbrd, isisd, bgpd: fix static errors #17986
Conversation
pnt += length; Signed-off-by: Dmytro Shytyi <[email protected]>
…inter [HIGH] /build/make-pkg/output/_packages/cp-routing/src/zebra/rib.h:612:6: Access to field 'status' results in a dereference of a null pointer (loaded from variable 're') [core.NullDereference] if (CHECK_FLAG(re->status, ROUTE_ENTRY_USE_FIB_NHG)) ^ Found 1 defect(s) in rib.h Signed-off-by: Dmytro Shytyi <[email protected]>
… null pointer (loaded from field 'neighbor') threeway_state = circuit->u.p2p.neighbor->threeway_state; Signed-off-by: Dmytro Shytyi <[email protected]>
va_end(msg->args); Signed-off-by: Dmytro Shytyi <[email protected]>
6986fc2
to
5afea88
Compare
w->sects = calloc(sizeof(PyObject *), w->ehdr->e_shnum); Signed-off-by: Dmytro Shytyi <[email protected]>
5afea88
to
b3ce0d2
Compare
…nc_ptr') if (*sid_wide_func_ptr == sid_wide_func) Signed-off-by: Dmytro Shytyi <[email protected]>
[HIGH] /build/make-pkg/output/_packages/cp-routing/src/lib/zlog.c:438:6: Access to field 'text' results in a dereference of a null pointer (loaded from variable 'msg') [core.NullDereference] if (msg->text && msg->text != stackbuf) Signed-off-by: Dmytro Shytyi <[email protected]>
b3ce0d2
to
8216ca0
Compare
@@ -598,6 +598,8 @@ DECLARE_HOOK(rib_shutdown, (struct route_node * rn), (rn)); | |||
*/ | |||
static inline struct nexthop_group *rib_get_fib_nhg(struct route_entry *re) | |||
{ | |||
if (re == NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer that we figure out why a call to rib-get_fib_nhg is even possible with a null pointer instead of this fix
@@ -1938,6 +1938,11 @@ int send_hello(struct isis_circuit *circuit, int level) | |||
size_t len_pointer; | |||
int retval; | |||
|
|||
if (!circuit) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again.. how is send_hello called with a null pointer?
@@ -1211,7 +1211,8 @@ static bool alloc_srv6_sid_func_explicit(struct zebra_srv6_sid_block *block, | |||
.func_allocated, | |||
node, | |||
sid_wide_func_ptr)) | |||
if (*sid_wide_func_ptr == sid_wide_func) | |||
if (sid_wide_func_ptr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how is this possible?
@@ -3712,10 +3712,6 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt, | |||
zlog_err("%pBP: Capability length error", peer); | |||
bgp_notify_send(peer->connection, BGP_NOTIFY_CEASE, | |||
BGP_NOTIFY_SUBCODE_UNSPECIFIC); | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally left the pnt addition in because if we ever modified the code I wanted a reminder that the length pointer needed to be handled appropriately. Why are we removing this commented out code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waiting on @donaldsharp 's comments ... I don't see anything beyond those right now
|
This PR addresses a set of fixes related to static errors in lib, zebra, pbrd, isisd, bgpd.
Each commit provides a description of the error that was present before and is attempted to be corrected.