mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-28 04:12:17 -04:00
BUG/MEDIUM: proxy: 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.
This commit is contained in:
parent
c29d0cda4b
commit
b746329dc3
1 changed files with 3 additions and 1 deletions
|
|
@ -1141,7 +1141,9 @@ int stream_set_backend(struct stream *s, struct proxy *be)
|
|||
* be more reliable to store the list of analysers that have been run,
|
||||
* but what we do here is OK for now.
|
||||
*/
|
||||
s->req.analysers |= be->be_req_ana & ~strm_li(s)->analysers;
|
||||
s->req.analysers |= be->be_req_ana;
|
||||
if (strm_li(s))
|
||||
s->req.analysers &= ~strm_li(s)->analysers;
|
||||
|
||||
/* If the target backend requires HTTP processing, we have to allocate
|
||||
* the HTTP transaction and hdr_idx if we did not have one.
|
||||
|
|
|
|||
Loading…
Reference in a new issue