From e6b39942d1054e52f7c9d3633aadea72f8c7e04b Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Fri, 7 Dec 2018 09:42:49 +0100 Subject: [PATCH] BUG/MEDIUM: mux-h1: Be sure to have a conn_stream to set CS_FL_REOS in h1_recv In the commit 6a2d33481 ("BUG/MEDIUM: h1: Set CS_FL_REOS if we had a read0."), We set the flag CS_FL_REOS on the conn_stream when a read0 is detected. But we must be sure to have a conn_stream first. --- src/mux_h1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mux_h1.c b/src/mux_h1.c index c2d00303e..4b0dab359 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -1587,7 +1587,7 @@ static int h1_recv(struct h1c *h1c) h1s->recv_wait = NULL; } - if (conn_xprt_read0_pending(conn)) + if (conn_xprt_read0_pending(conn) && h1s && h1s->cs) h1s->cs->flags |= CS_FL_REOS; if (!b_data(&h1c->ibuf)) h1_release_buf(h1c, &h1c->ibuf);