From 12a2f643b0e6e791ba61485430d0003eeb3e373c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 12 May 2011 14:34:04 -0700 Subject: libceph: use snprintf for unknown addrs Signed-off-by: Sage Weil --- net/ceph/messenger.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'net/ceph/messenger.c') diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index ce326c806237..3cdbb8853cd7 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -76,7 +76,8 @@ const char *ceph_pr_addr(const struct sockaddr_storage *ss) break; default: - sprintf(s, "(unknown sockaddr family %d)", (int)ss->ss_family); + snprintf(s, MAX_ADDR_STR_LEN, "(unknown sockaddr family %d)", + (int)ss->ss_family); } return s; -- cgit v1.2.3