diff mbox series

[ovs-dev,v3,2/8] cfm: Fix possible integer overflow in tc_add_matchall_policer().

Message ID 3f0f433c3d6b91c80261730640a8bc7e4f14b400.1716979680.git.echaudro@redhat.com
State Accepted
Commit b253d74d48e0cbf51bb46b99dc145d62a0565ea2
Headers show
Series Coverity fixes. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/intel-ovs-compilation success test: success
ovsrobot/github-robot-_Build_and_Test fail github build: failed
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_Build_and_Test success github build: passed

Commit Message

Eelco Chaudron May 29, 2024, 10:53 a.m. UTC
Fix unintentional integer overflow reported by Coverity by adding
the LL suffix to the numerical literals used in the multiplication.

Fixes: 5767a79a4059 ("cfm: Require ccm received in demand mode.")
Acked-by: Mike Pattrick <mkp@redhat.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
---
 lib/cfm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ilya Maximets May 29, 2024, 6:37 p.m. UTC | #1
On 5/29/24 12:53, Eelco Chaudron wrote:
> Fix unintentional integer overflow reported by Coverity by adding
> the LL suffix to the numerical literals used in the multiplication.
> 
> Fixes: 5767a79a4059 ("cfm: Require ccm received in demand mode.")
> Acked-by: Mike Pattrick <mkp@redhat.com>
> Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
> ---
>  lib/cfm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Recheck-request: github-robot
diff mbox series

Patch

diff --git a/lib/cfm.c b/lib/cfm.c
index c3742f3de..7eb080157 100644
--- a/lib/cfm.c
+++ b/lib/cfm.c
@@ -863,7 +863,7 @@  cfm_process_heartbeat(struct cfm *cfm, const struct dp_packet *p)
                 rmp->num_health_ccm++;
                 if (cfm->demand) {
                     timer_set_duration(&cfm->demand_rx_ccm_t,
-                                       100 * cfm->ccm_interval_ms);
+                                       100LL * cfm->ccm_interval_ms);
                 }
             }
             rmp->recv = true;