mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-21 14:17:30 -04:00
CLEANUP: init: address another coverity warning about a possible multiply overflow
Commit 2cb3be76b ("CLEANUP: init: address a coverity warning about
possible multiply overflow") was incomplete, two other locations were
present. This should address issue #1585.
This commit is contained in:
parent
1639d6c02b
commit
8e5b9589b3
1 changed files with 2 additions and 2 deletions
|
|
@ -2347,7 +2347,7 @@ static void init(int argc, char **argv)
|
|||
int64_t mem = global.rlimit_memmax * 1048576ULL;
|
||||
int64_t sslmem;
|
||||
|
||||
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;
|
||||
|
||||
|
|
@ -2380,7 +2380,7 @@ static void init(int argc, char **argv)
|
|||
int retried = 0;
|
||||
|
||||
if (global.ssl_used_frontend || global.ssl_used_backend)
|
||||
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 a new issue