From: Olivier Houchard Date: Thu, 6 Dec 2018 12:28:30 +0000 (+0100) Subject: BUG/MEDIUM: stream: Don't dereference s->txn when it is not there yet. X-Git-Tag: v1.9-dev10~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1909f6de18deaf0550a072eb21d3d81826686d0b;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: stream: Don't dereference s->txn when it is not there yet. Test if s->txn is non-NULL before attempting to dereference it, it was lost during the transition to HTX. --- diff --git a/src/stream.c b/src/stream.c index be58e77bd6..805fe4d509 100644 --- a/src/stream.c +++ b/src/stream.c @@ -2204,7 +2204,8 @@ redo: * we simply reset msg->sov so that HTTP rewinding points to the * headers. */ - s->txn->req.sov = s->txn->req.eoh + s->txn->req.eol - co_data(req); + if (s->txn) + s->txn->req.sov = s->txn->req.eoh + s->txn->req.eol - co_data(req); } } @@ -2374,7 +2375,8 @@ redo: * we simply reset msg->sov so that HTTP rewinding points to the * headers. */ - s->txn->rsp.sov = s->txn->rsp.eoh + s->txn->rsp.eol - co_data(res); + if (s->txn) + s->txn->rsp.sov = s->txn->rsp.eoh + s->txn->rsp.eol - co_data(res); } /* if we have no analyser anymore in any direction and have a