mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-29 08:02:08 +00:00
CLEANUP: init: address a coverity warning about possible multiply overflow
In issue #1585 Coverity suspects a risk of multiply overflow when calculating the SSL cache size, though in practice the cache is limited to 2^32 anyway thus it cannot really happen. Nevertheless, casting the operation should be sufficient to avoid marking it as a false positive.
This commit is contained in:
parent
019a182ebf
commit
2cb3be76bf
@ -2302,7 +2302,7 @@ static void init(int argc, char **argv)
|
||||
int64_t mem = global.rlimit_memmax * 1048576ULL;
|
||||
int retried = 0;
|
||||
|
||||
mem -= global.tune.sslcachesize * 200; // about 200 bytes per SSL cache entry
|
||||
mem -= global.tune.sslcachesize * 200ULL; // about 200 bytes per SSL cache entry
|
||||
mem -= global.maxzlibmem;
|
||||
mem = mem * MEM_USABLE_RATIO;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user