libceph: use snprintf for unknown addrs

Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil 2011-05-12 14:34:04 -07:00
parent 2dab036b8c
commit 12a2f643b0

View File

@ -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;