New Defects reported by Coverity Scan for freerangerouting/frr
scan-admin at coverity.com
scan-admin at coverity.com
Tue Aug 16 21:18:50 UTC 2022
Hi,
Please find the latest report on new defect(s) introduced to freerangerouting/frr found with Coverity Scan.
3 new defect(s) introduced to freerangerouting/frr found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)
** CID 1519903: Uninitialized variables (UNINIT)
________________________________________________________________________________________________________
*** CID 1519903: Uninitialized variables (UNINIT)
/zebra/tc_netlink.c: 317 in netlink_tclass_msg_encode()
311 sizeof(ceil));
312 }
313
314 nl_attr_put(&req->n, datalen, TCA_HTB_PARMS, &htb_opt, sizeof(htb_opt));
315
316 nl_attr_put(&req->n, datalen, TCA_HTB_RTAB, rtab, sizeof(rtab));
>>> CID 1519903: Uninitialized variables (UNINIT)
>>> Using uninitialized element of array "ctab" when calling "nl_attr_put".
317 nl_attr_put(&req->n, datalen, TCA_HTB_CTAB, ctab, sizeof(ctab));
318 nl_attr_nest_end(&req->n, nest);
319
320 return NLMSG_ALIGN(req->n.nlmsg_len);
321 }
322
** CID 1519902: Possible Control flow issues (DEADCODE)
/zebra/zebra_dplane.c: 2785 in dplane_ctx_tc_init()
________________________________________________________________________________________________________
*** CID 1519902: Possible Control flow issues (DEADCODE)
/zebra/zebra_dplane.c: 2785 in dplane_ctx_tc_init()
2779 struct zebra_ns *zns = NULL;
2780
2781 ctx->zd_op = op;
2782 ctx->zd_status = ZEBRA_DPLANE_REQUEST_SUCCESS;
2783
2784 /* TODO: init traffic control qdisc */
>>> CID 1519902: Possible Control flow issues (DEADCODE)
>>> Execution cannot reach the expression "zvrf->zns" inside this statement: "zns = (zvrf ? zvrf->zns : z...".
2785 zns = zvrf ? zvrf->zns : zebra_ns_lookup(NS_DEFAULT);
2786
2787 dplane_ctx_ns_init(ctx, zns, true);
2788
2789 ret = AOK;
2790
** CID 1519901: Code maintainability issues (UNUSED_VALUE)
/zebra/zebra_dplane.c: 3516 in dplane_tc_update_internal()
________________________________________________________________________________________________________
*** CID 1519901: Code maintainability issues (UNUSED_VALUE)
/zebra/zebra_dplane.c: 3516 in dplane_tc_update_internal()
3510 return result;
3511 }
3512
3513 static enum zebra_dplane_result dplane_tc_update_internal(enum dplane_op_e op)
3514 {
3515 enum zebra_dplane_result result = ZEBRA_DPLANE_REQUEST_FAILURE;
>>> CID 1519901: Code maintainability issues (UNUSED_VALUE)
>>> Assigning value "22" to "ret" here, but that stored value is overwritten before it can be used.
3516 int ret = EINVAL;
3517 struct zebra_dplane_ctx *ctx = NULL;
3518
3519 /* Obtain context block */
3520 ctx = dplane_ctx_alloc();
3521
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yrtN2DGUU98GYhjd55wXsXtw53zRK70R0agdV-2Fb7c45-2BkxBoZjryQtr5SpUD80NNfE-3D6qYL_O0IDF7c8sUs2B6kWTeWwAJZqriD5fgsfL8PAN30oQTxkm5nb0EpUHR-2B4Lh-2BWCx6UW2evu8CBcwNuB1MJV03fGTZlMANRp7DfCFRDGjYQnkK0NAvCwFqutH5wXJ42eOocWFdyXdVkB5vqYMdxQmTAOzi7WRezgokjbNvnaMqdiPYBqwbN6ocIeUEFsb1K89-2FHfM4i9teNEXMLqe2TZM6ouQ-3D-3D
More information about the dev
mailing list