New Defects reported by Coverity Scan for freerangerouting/frr
scan-admin at coverity.com
scan-admin at coverity.com
Tue Oct 31 23:22:13 UTC 2023
Hi,
Please find the latest report on new defect(s) introduced to freerangerouting/frr found with Coverity Scan.
2 new defect(s) introduced to freerangerouting/frr found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)
** CID 1570864: Incorrect expression (UNINTENDED_INTEGER_DIVISION)
/bgpd/bgp_labelpool.c: 656 in bgp_lp_event_zebra_up()
________________________________________________________________________________________________________
*** CID 1570864: Incorrect expression (UNINTENDED_INTEGER_DIVISION)
/bgpd/bgp_labelpool.c: 656 in bgp_lp_event_zebra_up()
650
651 lp->next_chunksize <<= 1;
652 }
653
654 /* round up */
655 if (((float)labels_needed / (float)lp->next_chunksize) >
>>> CID 1570864: Incorrect expression (UNINTENDED_INTEGER_DIVISION)
>>> Dividing integer expressions "labels_needed" and "lp->next_chunksize", and then converting the integer quotient to type "float". Any remainder, or fractional part of the quotient, is ignored.
656 (labels_needed / lp->next_chunksize))
657 chunks_needed = (labels_needed / lp->next_chunksize) + 1;
658 else
659 chunks_needed = (labels_needed / lp->next_chunksize);
660 labels_needed = chunks_needed * lp->next_chunksize;
661
** CID 1570863: Control flow issues (DEADCODE)
/zebra/redistribute.c: 138 in zebra_redistribute()
________________________________________________________________________________________________________
*** CID 1570863: Control flow issues (DEADCODE)
/zebra/redistribute.c: 138 in zebra_redistribute()
132 && (newre->type != type
133 || newre->instance != instance)))
134 continue;
135 if (!zebra_check_addr(&rn->p))
136 continue;
137
>>> CID 1570863: Control flow issues (DEADCODE)
>>> Execution cannot reach the expression "newre->vrf_id != 0U" inside this statement: "if (type == ZEBRA_ROUTE_ADD...".
138 if (type == ZEBRA_ROUTE_ADD && is_table_direct &&
139 newre->vrf_id != VRF_DEFAULT)
140 continue;
141
142 zsend_redistribute_route(ZEBRA_REDISTRIBUTE_ROUTE_ADD,
143 client, rn, newre, is_table_direct);
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yrtN2DGUU98GYhjd55wXsXtw53zRK70R0agdV-2Fb7c45-2BoAJF92cCodBN9BBnDbw-2FFg-3Do6M3_O0IDF7c8sUs2B6kWTeWwAJZqriD5fgsfL8PAN30oQTy-2Bz41m1NuKy6yQHEP4VmjoqQfa-2Bsw2f2IEnJQ2A6ozT2Ig0oy0u1nHafOr20-2Bwuw1cmMbSk2oImUojIAa7cQhXxCoRYbs9wW8ZYUd7LCgsJ0-2FFQqU6yk93-2BvpzyUTr6DfKq3XIR7A7eY4Qhk2PhwjHbq7OnkQ0qXMJ04JRZ92tRg-3D-3D
More information about the dev
mailing list