mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-15 07:54:33 +00:00
BUG/MINOR: send-proxy-v2: string size must include ('\0')
strlen() exclude the terminating null byte ('\0'), add it.
This commit is contained in:
parent
571c7ac0a5
commit
82913e4f79
@ -1056,7 +1056,7 @@ int make_proxy_line_v2(char *buf, int buf_len, struct server *srv, struct connec
|
||||
tlv->client |= PP2_CLIENT_SSL;
|
||||
value = ssl_sock_get_proto_version(remote);
|
||||
if (value) {
|
||||
ssl_tlv_len += make_tlv(&buf[ret+ssl_tlv_len], (buf_len-ret-ssl_tlv_len), PP2_SUBTYPE_SSL_VERSION, strlen(value), value);
|
||||
ssl_tlv_len += make_tlv(&buf[ret+ssl_tlv_len], (buf_len - ret - ssl_tlv_len), PP2_SUBTYPE_SSL_VERSION, strlen(value)+1, value);
|
||||
}
|
||||
if (ssl_sock_get_cert_used_sess(remote)) {
|
||||
tlv->client |= PP2_CLIENT_CERT_SESS;
|
||||
|
Loading…
Reference in New Issue
Block a user