From 2f46aec2be4b00fbf75cf22b5894f3eae9498944 Mon Sep 17 00:00:00 2001 From: SashaXser <24498484+SashaXser@users.noreply.github.com> Date: Sat, 12 Oct 2024 20:47:39 +0400 Subject: [PATCH] Fix code scanning alert no. 1: Multiplication result converted to larger type Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- tpws/tpws.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tpws/tpws.c b/tpws/tpws.c index 3e49485..383edef 100644 --- a/tpws/tpws.c +++ b/tpws/tpws.c @@ -1132,7 +1132,7 @@ static bool set_ulimit(void) // additional 1/2 for unpaired remote legs sending buffers // 16 for listen_fd, epoll, hostlist, ... #ifdef SPLICE_PRESENT - fdmax = (params.nosplice ? 2 : (params.tamper && !params.tamper_lim ? 4 : 6)) * params.maxconn; + fdmax = (rlim_t)(params.nosplice ? 2 : (params.tamper && !params.tamper_lim ? 4 : 6)) * (rlim_t)params.maxconn; #else fdmax = 2 * params.maxconn; #endif