Skip to content

Commit

Permalink
libceph: use snprintf for formatting object name
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Sage Weil committed May 19, 2011
1 parent ae59808 commit 2dab036
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 2dab036

Please sign in to comment.