]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: dumpstats: undefined behavior in stats_tlskeys_list()
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 14 Jun 2016 15:45:18 +0000 (17:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 14 Jun 2016 17:41:58 +0000 (19:41 +0200)
commitcf9e78879008ee3ec1777fa2d0b45661acbb9380
tree7deb552340ac294521c1f97795c132e83efc1ad8
parente984a0e4fb4cf04b5e58c9d6d34fa44cf4f1971e
BUG/MEDIUM: dumpstats: undefined behavior in stats_tlskeys_list()

The function stats_tlskeys_list() can meet an undefined behavior when
called with appctx->st2 == STAT_ST_LIST, indeed the ref pointer is used
uninitialized.

However this function was using NULL in appctx->ctx.tlskeys.ref as a
flag to dump every tickets from every references.  A real flag
appctx->ctx.tlskeys.dump_all is now used for this behavior.

This patch delete the 'ref' variable and use appctx->ctx.tlskeys.ref
directly.
include/types/applet.h
src/dumpstats.c