BUG/MEDIUM: tools: Fix `inet_ntop` usage in sa2str

The given size must be the size of the destination buffer, not the size of the
(binary) address representation.

This fixes GitHub issue #1599.

The bug was introduced in 92149f9a82a9b55c598f1cc815bc330c555f3561 which is in
2.4+. The fix must be backported there.

(cherry picked from commit 162f0875adbe1418ef3cabf68bf1c70ba94e4f56)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 452aa327894ce58dc88895c679db51ade7fc0839)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/tools.c b/src/tools.c
index 52b4890..c40ad5f 100644
--- a/src/tools.c
+++ b/src/tools.c
@@ -1346,7 +1346,7 @@
 	default:
 		return NULL;
 	}
-	inet_ntop(addr->ss_family, ptr, buffer, get_addr_len(addr));
+	inet_ntop(addr->ss_family, ptr, buffer, sizeof(buffer));
 	if (map_ports)
 		return memprintf(&out, "%s:%+d", buffer, port);
 	else