[MINOR] config: fix too large ssl-hello-check message.

As reported by Cyril Bont and Herv Commowick, the ssl-hello-check
should use sizeof()-1 and not sizeof() for the message length.
This commit is contained in:
Willy Tarreau 2010-02-01 16:38:17 +01:00
parent 54f6a586cd
commit 137325dc71

View File

@ -4817,9 +4817,9 @@ out_uri_auth_compat:
} }
if (curproxy->options & PR_O_SSL3_CHK) { if (curproxy->options & PR_O_SSL3_CHK) {
curproxy->check_len = sizeof(sslv3_client_hello_pkt); curproxy->check_len = sizeof(sslv3_client_hello_pkt) - 1;
curproxy->check_req = (char *)malloc(sizeof(sslv3_client_hello_pkt)); curproxy->check_req = (char *)malloc(curproxy->check_len);
memcpy(curproxy->check_req, sslv3_client_hello_pkt, sizeof(sslv3_client_hello_pkt)); memcpy(curproxy->check_req, sslv3_client_hello_pkt, curproxy->check_len);
} }
/* The small pools required for the capture lists */ /* The small pools required for the capture lists */