]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cfgparse: parse tune.bufsize as a size
authorWilly Tarreau <w@1wt.eu>
Mon, 18 Nov 2024 18:04:57 +0000 (19:04 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 18 Nov 2024 18:06:25 +0000 (19:06 +0100)
commita344d37fadecaa20da046585654571920fa393ea
treef83713b0772e5ac9aa9668952329df6262efcca6
parent2f0c6ff3a5c8205abcd9dbecf2e76c6ff4ced400
MINOR: cfgparse: parse tune.bufsize as a size

Till now this value was parsed as raw integer using atol() and would
silently ignore any trailing suffix, preventing from starting when set
e.g. to "64k". Let's make use of parse_size_err() on it so that units are
supported. This requires to turn it to uint as well, and to explicitly
limit its range to INT_MAX - 2*sizeof(void*), which was previously
partially handled as part of the sign check.
doc/configuration.txt
include/haproxy/global-t.h
src/cfgparse-global.c