Re: [PATCH 2/2] CLEANUP: tools: Crash if inet_ntop fails in sa2str

2022-05-23 Thread Willy Tarreau
On Sun, May 22, 2022 at 01:06:28PM +0200, Tim Duesterhus wrote: > @@ -1374,7 +1374,10 @@ char * sa2str(const struct sockaddr_storage *addr, int > port, int map_ports) > default: > return NULL; > } > - inet_ntop(addr->ss_family, ptr, buffer, sizeof(buffer)); > +

[PATCH 2/2] CLEANUP: tools: Crash if inet_ntop fails in sa2str

2022-05-22 Thread Tim Duesterhus
This is impossible, because we pass a destination buffer that is appropriately sized to hold an IPv6 address. This is related to GitHub issue #1599. --- src/tools.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools.c b/src/tools.c index b9a1121c6..ce82fea4a 100644