From: Willy Tarreau Date: Wed, 23 Sep 2015 10:16:43 +0000 (+0200) Subject: BUG/MAJOR: cli: do not dereference strm_li()->proto->name X-Git-Tag: v1.6-dev6~95 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1e0212d54fc1987431c4e24da6a74acf78d6f56;p=thirdparty%2Fhaproxy.git BUG/MAJOR: cli: do not dereference strm_li()->proto->name Or it will crash when dumping streams instanciated by an applet, like Lua's cosockets. --- diff --git a/src/dumpstats.c b/src/dumpstats.c index fae9e3fde5..39bdd17142 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -6011,8 +6011,7 @@ static int stats_dump_sess_to_buffer(struct stream_interface *si) chunk_appendf(&trash, "%p: proto=%s", curr_sess, - strm_li(curr_sess)->proto->name); - + strm_li(curr_sess) ? strm_li(curr_sess)->proto->name : "?"); conn = objt_conn(strm_orig(curr_sess)); switch (conn ? addr_to_str(&conn->addr.from, pn, sizeof(pn)) : AF_UNSPEC) {