mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 06:41:32 +02:00
BUG/MINOR: send-proxy-v2: fix dest_len in make_tlv call
Subtract already allocated size from buf_len.
This commit is contained in:
parent
901f75c4a6
commit
571c7ac0a5
@ -1039,7 +1039,7 @@ int make_proxy_line_v2(char *buf, int buf_len, struct server *srv, struct connec
|
||||
if (conn_get_alpn(remote, &value, &value_len)) {
|
||||
if ((buf_len - ret) < sizeof(struct tlv))
|
||||
return 0;
|
||||
ret += make_tlv(&buf[ret], buf_len, PP2_TYPE_ALPN, value_len, value);
|
||||
ret += make_tlv(&buf[ret], (buf_len - ret), PP2_TYPE_ALPN, value_len, value);
|
||||
}
|
||||
|
||||
#ifdef USE_OPENSSL
|
||||
@ -1081,7 +1081,7 @@ int make_proxy_line_v2(char *buf, int buf_len, struct server *srv, struct connec
|
||||
if (remote && (remote->proxy_netns)) {
|
||||
if ((buf_len - ret) < sizeof(struct tlv))
|
||||
return 0;
|
||||
ret += make_tlv(&buf[ret], buf_len, PP2_TYPE_NETNS, remote->proxy_netns->name_len, remote->proxy_netns->node.key);
|
||||
ret += make_tlv(&buf[ret], (buf_len - ret), PP2_TYPE_NETNS, remote->proxy_netns->name_len, remote->proxy_netns->node.key);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user