From f1e0212d54fc1987431c4e24da6a74acf78d6f56 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 23 Sep 2015 12:16:43 +0200 Subject: [PATCH] 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. --- src/dumpstats.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dumpstats.c b/src/dumpstats.c index fae9e3fde..39bdd1714 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) {