This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new c7d8d1798f Fix possible overflow
c7d8d1798f is described below
commit c7d8d1798f4469c58d104b189912cecd5b8a447e
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Oct 14 08:11:54 2026 +0100
Fix possible overflow
---
java/org/apache/catalina/session/ManagerBase.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/session/ManagerBase.java
b/java/org/apache/catalina/session/ManagerBase.java
index a9fbe62baf..10fe2b9b34 100644
--- a/java/org/apache/catalina/session/ManagerBase.java
+++ b/java/org/apache/catalina/session/ManagerBase.java
@@ -776,7 +776,7 @@ public abstract class ManagerBase extends
LifecycleMBeanBase implements Manager
// the manager because it is being persisted - update the expired stats
if (update) {
long timeNow = System.currentTimeMillis();
- int timeAlive = (int) (timeNow -
session.getCreationTimeInternal()) / 1000;
+ int timeAlive = (int) ((timeNow -
session.getCreationTimeInternal()) / 1000L);
updateSessionMaxAliveTime(timeAlive);
expiredSessions.incrementAndGet();
SessionTiming timing = new SessionTiming(timeNow, timeAlive);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]