]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
silence coverity complaint about possible overflow (CID #1469150) (#4474)
authorJames Jones <jejones3141@gmail.com>
Fri, 29 Apr 2022 12:33:43 +0000 (07:33 -0500)
committerGitHub <noreply@github.com>
Fri, 29 Apr 2022 12:33:43 +0000 (08:33 -0400)
src/lib/server/trunk.c

index ef77846b7a1d3eff26bc3b676de8efbfef51eac0..d602b8315686d6f2e1e0e6b113bf87497c2911f2 100644 (file)
@@ -2362,7 +2362,7 @@ fr_trunk_request_t *fr_trunk_request_alloc(fr_trunk_t *trunk, request_t *request
        if (trunk->conf.max_req_per_conn && trunk->conf.max) {
                uint64_t limit;
 
-               limit = trunk->conf.max_req_per_conn * trunk->conf.max;
+               limit = (uint64_t) trunk->conf.max_req_per_conn * trunk->conf.max;
                if (trunk->pub.req_alloc >= limit) {
                        RATE_LIMIT_LOCAL_ROPTIONAL(&trunk->limit_max_requests_alloc_log,
                                                   RWARN, WARN, "Refusing to alloc requests - "