From: Willy Tarreau Date: Wed, 24 Aug 2011 06:23:34 +0000 (+0200) Subject: [BUG] possible crash in 'show table' on stats socket X-Git-Tag: v1.5-dev8~144 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e17a8d02d99b09d1d6ddf8286c5060c05edc1b93;p=thirdparty%2Fhaproxy.git [BUG] possible crash in 'show table' on stats socket Patch d5b9fd95 was missing an initialisation of "ctx.table.target", which caused "show table" to segfault if it was issued after a "show errors" (target pointer == -1). --- diff --git a/src/dumpstats.c b/src/dumpstats.c index 9c8922609d..a3dc52e317 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -617,6 +617,7 @@ static void stats_sock_table_request(struct stream_interface *si, char **args, b { si->applet.ctx.table.data_type = -1; si->applet.state = STAT_ST_INIT; + si->applet.ctx.table.target = NULL; si->applet.ctx.table.proxy = NULL; si->applet.ctx.table.entry = NULL; if (show)