]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: sample: switch to saturated arithmetic
authorThierry FOURNIER <tfournier@arpalert.org>
Tue, 7 Jul 2015 23:10:21 +0000 (01:10 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 21 Jul 2015 22:48:24 +0000 (00:48 +0200)
commit00c005c72637b68758d891599017024ded13879d
treeaa793f4476f3f2f6adc51ed69850eb0e74ed9032
parentbf65cd4d77bc2b4699c690c7b0fcaa6676944507
MEDIUM: sample: switch to saturated arithmetic

This patch check calculus for overflow and returns capped values.
This permits to protect against integer overflow in certain operations
involving ratios, percentages, limits or anything. That can sometimes
be critically important with some operations (eg: content-length < X).
doc/configuration.txt
src/sample.c