From f45675c2a20a98ff62b87712e190a55a9b9d99c8 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 25 Sep 2013 21:10:13 -0700 Subject: [PATCH] msg/msg_types: use proper NI_MAXSERV when formatting an IP address May as well be pedantic about it, even though we are leaving the port in numeric form. Signed-off-by: Sage Weil Reviewed-by: Yehuda Sadeh --- src/msg/msg_types.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msg/msg_types.cc b/src/msg/msg_types.cc index 38416abd4f2..b02db768bfb 100644 --- a/src/msg/msg_types.cc +++ b/src/msg/msg_types.cc @@ -135,7 +135,7 @@ bool entity_addr_t::parse(const char *s, const char **end) ostream& operator<<(ostream& out, const sockaddr_storage &ss) { char buf[NI_MAXHOST] = { 0 }; - char serv[20] = { 0 }; + char serv[NI_MAXSERV] = { 0 }; size_t hostlen; if (ss.ss_family == AF_INET) -- 2.47.3