diff --git a/src/payload.c b/src/payload.c index 4057f6f85..f62163c41 100644 --- a/src/payload.c +++ b/src/payload.c @@ -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;