]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: checks: do not dereference a list as a tcpcheck struct
authorWilly Tarreau <w@1wt.eu>
Wed, 13 May 2015 10:24:53 +0000 (12:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 13 May 2015 13:31:34 +0000 (15:31 +0200)
commit5581c27b579cbfc53afb0ca04cdeebe7e2200131
treebc37935d74246a72128195bc57b73a525e3b5491
parentf2c87353a7f8160930b5f342bb6d6ad0991ee3d1
BUG/MEDIUM: checks: do not dereference a list as a tcpcheck struct

The method used to skip to next rule in the list is wrong, it assumes
that the list element starts at the same offset as the rule. It happens
to be true on most architectures since the list is the first element for
now but it's definitely wrong. Now the code doesn't crash anymore when
the struct list is moved anywhere else in the struct tcpcheck_rule.

This fix must be backported to 1.5.
src/cfgparse.c
src/checks.c