BUG/MINOR: cache: Crashes with "total-max-size" > 2047(MB).
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 25 Oct 2018 18:17:45 +0000 (20:17 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 26 Oct 2018 02:54:40 +0000 (04:54 +0200)
commitb9b8b6b6beb84b6b942d24eda56bfbe3812cc294
treeae4cfd50f993e6babcb545d407e64d2d8773168c
parent5f8bea64884f306bf8da69fd8ae9760de54fcf7b
BUG/MINOR: cache: Crashes with "total-max-size" > 2047(MB).

With this patch we support cache size larger than 2047 (MB) and prevent haproxy from crashing when "total-max-size" is parsed as negative values by atoi().

The limit at parsing time is 4095 MB (UINT_MAX >> 20).

May be backported to 1.8.
src/cache.c