]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix overflow in rlm_cache
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 23 Sep 2021 18:13:59 +0000 (13:13 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 23 Sep 2021 18:13:59 +0000 (13:13 -0500)
src/modules/rlm_cache/rlm_cache.c

index 474e5c78e202c54d649253fd75f8611f6d653aa9..a7d89792a8d02f792da8ff515480829106b013dc 100644 (file)
@@ -718,7 +718,7 @@ static unlang_action_t CC_HINT(nonnull) mod_cache_it(rlm_rcode_t *p_result, modu
 
                fr_assert(c);
 
-               c->expires = fr_time_to_unix_time(request->packet->timestamp) + fr_unix_time_from_sec(ttl);
+               c->expires = fr_time_to_unix_time(request->packet->timestamp) + ttl;
 
                cache_set_ttl(&tmp, inst, request, &handle, c);
                switch (tmp) {