libceph: use snprintf for unknown addrs
authorSage Weil <sage@newdream.net>
Thu, 12 May 2011 21:34:04 +0000 (14:34 -0700)
committerSage Weil <sage@newdream.net>
Thu, 19 May 2011 18:25:03 +0000 (11:25 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
net/ceph/messenger.c

index ce326c806237a72534b8547f47cf4fc023c2f604..3cdbb8853cd714a69d5b656c85809a8f38903a10 100644 (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;