From: John Spray Date: Mon, 9 Jan 2017 10:29:47 +0000 (+0000) Subject: Merge pull request #12515 from kylinstorage/wip-safe-trace X-Git-Tag: v12.0.0~258 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=411bd53555ea0af68dc292c76e626c04ba15a703;p=ceph.git Merge pull request #12515 from kylinstorage/wip-safe-trace client: fix potential buffer overflow Reviewed-by: Sage Weil --- 411bd53555ea0af68dc292c76e626c04ba15a703 diff --cc src/client/SyntheticClient.cc index 73024ff4842e,b28f077b0de6..234a1b202777 --- a/src/client/SyntheticClient.cc +++ b/src/client/SyntheticClient.cc @@@ -1005,10 -1004,10 +1005,10 @@@ int SyntheticClient::play_trace(Trace& UserPerm perms = client->pick_my_perms(); t.start(); - char buf[1024]; - char buf2[1024]; + string buf; + string buf2; - utime_t start = ceph_clock_now(client->cct); + utime_t start = ceph_clock_now(); ceph::unordered_map open_files; ceph::unordered_map open_dirs;