summaryrefslogtreecommitdiff
path: root/contrib/persistent-https
diff options
context:
space:
mode:
authorSebastien Tardif <sebtardif@ncf.ca>2026-05-28 02:56:55 +0000
committerJunio C Hamano <gitster@pobox.com>2026-05-29 14:25:41 +0900
commit30c8fda1ab6d55d3b0129bb1686c23bf06cd5b0d (patch)
tree3cfbe2b0b3ee679a873c2eddbd46116abe03d6d6 /contrib/persistent-https
parentb8cda126b4e0fbfd514b26dec4ee8a1c6849abe9 (diff)
daemon: fix IPv6 address truncation in ip2str()
The sockaddr struct size (ai_addrlen) is passed as the output buffer size to inet_ntop(). For IPv6, sizeof(sockaddr_in6) is 28 bytes but INET6_ADDRSTRLEN is 46, so long IPv6 addresses are silently truncated. Fix this by passing sizeof(ip) instead, which is the actual size of the destination buffer. Drop the now-unused len parameter from ip2str() and update all callers. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions