mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-09 21:07:43 +00:00
haproxy public development tree
As was first reported by Ilya in issue #1513, Gcc 12 incorrectly reports a possible overflow from the concatenation of two strings whose size was previously checked to fit: src/ssl_crtlist.c: In function 'crtlist_parse_file': src/ssl_crtlist.c:545:58: error: '%s' directive output may be truncated writing up to 4095 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=] 545 | snprintf(path, sizeof(path), "%s/%s", global_ssl.crt_base, crt_path); | ^~ src/ssl_crtlist.c:545:25: note: 'snprintf' output between 2 and 8192 bytes into a destination of size 4097 545 | snprintf(path, sizeof(path), "%s/%s", global_ssl.crt_base, crt_path); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It would be a bit concerning to disable -Wformat-truncation because it might detect real programming mistakes at other places. The solution adopted in this patch is absolutely ugly and error-prone, but it works, it consists in integrating the snprintf() call in the error condition and to test the result again. Let's hope a smarter compiler will not warn that this test is absurd since guaranteed by the first condition... This may have to be backported for those suffering from a compiler upgrade. |
||
---|---|---|
.github | ||
addons | ||
admin | ||
dev | ||
doc | ||
examples | ||
include | ||
reg-tests | ||
scripts | ||
src | ||
tests | ||
.cirrus.yml | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.travis.yml | ||
BRANCHES | ||
CHANGELOG | ||
CONTRIBUTING | ||
INSTALL | ||
LICENSE | ||
MAINTAINERS | ||
Makefile | ||
README | ||
ROADMAP | ||
SUBVERS | ||
VERDATE | ||
VERSION |
The HAProxy documentation has been split into a number of different files for ease of use. Please refer to the following files depending on what you're looking for : - INSTALL for instructions on how to build and install HAProxy - BRANCHES to understand the project's life cycle and what version to use - LICENSE for the project's license - CONTRIBUTING for the process to follow to submit contributions The more detailed documentation is located into the doc/ directory : - doc/intro.txt for a quick introduction on HAProxy - doc/configuration.txt for the configuration's reference manual - doc/lua.txt for the Lua's reference manual - doc/SPOE.txt for how to use the SPOE engine - doc/network-namespaces.txt for how to use network namespaces under Linux - doc/management.txt for the management guide - doc/regression-testing.txt for how to use the regression testing suite - doc/peers.txt for the peers protocol reference - doc/coding-style.txt for how to adopt HAProxy's coding style - doc/internals for developer-specific documentation (not all up to date)