From c29d0cda4b4502c4e04411cab0205d33a04086d2 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 23 Sep 2015 12:18:14 +0200 Subject: [PATCH] BUG/MEDIUM: http: do not dereference strm_li(stream) Some streams do not have a listener (eg: Lua's cosockets) so let's check for this. For now this problem cannot happen but it's definitely unsafe. --- src/proto_http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proto_http.c b/src/proto_http.c index 0fb57d39d..57cc35487 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -5284,7 +5284,7 @@ void http_end_txn_clean_session(struct stream *s) si_idle_conn(&s->si[1], &srv->idle_conns); } - s->req.analysers = strm_li(s)->analysers; + s->req.analysers = strm_li(s) ? strm_li(s)->analysers : 0; s->res.analysers = 0; }