The threshold computation could overflow during the conversion to ms. Make sure that the arithmetic is done on 64-bit value instead of 32-bit one.
Signed-off-by: Ales Musil <[email protected]> --- northd/aging.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/northd/aging.c b/northd/aging.c index 9685044e7..e095f29b2 100644 --- a/northd/aging.c +++ b/northd/aging.c @@ -330,7 +330,8 @@ aging_context_handle_timestamp(struct aging_context *ctx, int64_t timestamp, } ovs_assert(ctx->threshold); - uint64_t threshold = 1000 * find_threshold_for_ip(ip, ctx->threshold); + uint64_t threshold = + 1000 * (uint64_t) find_threshold_for_ip(ip, ctx->threshold); if (!threshold) { return false; -- 2.45.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
