mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-18 11:59:16 -04: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue