Bug 55187 - Integer overflow when computing ONE_YEAR_MS in HTTP CacheManager
Summary: Integer overflow when computing ONE_YEAR_MS in HTTP CacheManager
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.8
Hardware: Macintosh All
: P2 minor (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-03 02:21 UTC by Scott Moore
Modified: 2013-07-05 08:45 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Moore 2013-07-03 02:21:10 UTC
The calculation "long ONE_YEAR_MS = 365*86400*1000;" overflows (and computes the wrong value) because the constants are not marked as long. The result is 1,471,228,928 rather than 31,536,000,000.
Comment 1 Sebb 2013-07-05 08:45:54 UTC
Thanks, good catch!

Luckily the exact number of seconds is not critical - the expiry time is arbitrary. Fixed:

URL: http://svn.apache.org/r1499938
Log:
Integer overflow when computing ONE_YEAR_MS in HTTP CacheManager
Bugzilla Id: 55187

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java
    jmeter/trunk/xdocs/changes.xml
Comment 2 The ASF infrastructure team 2022-09-24 20:37:54 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3155