From: Sage Weil Date: Thu, 12 May 2011 21:29:51 +0000 (-0700) Subject: libceph: use snprintf for formatting object name X-Git-Tag: firefly_0821_release~7613^2~907^2~22 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2dab036b8c349d747f447ac98c8eb40c769727a8;p=firefly-linux-kernel-4.4.55.git libceph: use snprintf for formatting object name Signed-off-by: Sage Weil --- diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 6b5dda1cb5df..9adbb01d23ad 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -124,7 +124,7 @@ static void calc_layout(struct ceph_osd_client *osdc, ceph_calc_raw_layout(osdc, layout, vino.snap, off, plen, &bno, req, op); - sprintf(req->r_oid, "%llx.%08llx", vino.ino, bno); + snprintf(req->r_oid, sizeof(req->r_oid), "%llx.%08llx", vino.ino, bno); req->r_oid_len = strlen(req->r_oid); }