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 <m...@redhat.com>
Signed-off-by: Eelco Chaudron <echau...@redhat.com>
---
 lib/cfm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.44.0

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to