mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-03 20:39:41 -05:00
BUG/MEDIUM: payload: ensure that a request channel is available
Denys Fedoryshchenko reported a segfault when using certain sample fetch functions in the "tcp-request connection" rulesets despite the warnings. This is because some tests for the existence of the channel were missing. The fetches which were fixed are : - req.ssl_hello_type - rep.ssl_hello_type - req.ssl_sni This fix must be backported to 1.5.
This commit is contained in:
parent
4deaf39243
commit
83f2592bcd
1 changed files with 6 additions and 0 deletions
|
|
@ -72,6 +72,9 @@ smp_fetch_ssl_hello_type(struct proxy *px, struct session *s, void *l7, unsigned
|
|||
|
||||
chn = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? s->rep : s->req;
|
||||
|
||||
if (!chn)
|
||||
goto not_ssl_hello;
|
||||
|
||||
bleft = chn->buf->i;
|
||||
data = (const unsigned char *)chn->buf->p;
|
||||
|
||||
|
|
@ -276,6 +279,9 @@ smp_fetch_ssl_hello_sni(struct proxy *px, struct session *s, void *l7, unsigned
|
|||
|
||||
chn = ((opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? s->rep : s->req;
|
||||
|
||||
if (!chn)
|
||||
goto not_ssl_hello;
|
||||
|
||||
bleft = chn->buf->i;
|
||||
data = (unsigned char *)chn->buf->p;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue