BUG/MINOR: listener: fix off-by-one in state name check
authorWilly Tarreau <w@1wt.eu>
Wed, 11 Dec 2019 14:51:37 +0000 (15:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 11 Dec 2019 14:54:04 +0000 (15:54 +0100)
commitb23644370b9a5ed727e50b01bfa390078c7462c1
treedd435d7fea8928276540b4a12317a93655e9db0b
parent3834754e654fa41491916a2e23c5fbe9b4ba5d82
BUG/MINOR: listener: fix off-by-one in state name check

As reported in issue #380, the state check in listener_state_str() is
invalid as it allows state value 9 to report crap. We don't use such
a state value so the issue should never happen unless the memory is
already corrupted, but better clean this now while it's harmless.

This should be backported to all maintained branches.

(cherry picked from commit fec56c6a76463d40be3e15eee297aa8d2b67362a)
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/proto/listener.h