diff options
author | Yehuda Sadeh <yehuda@inktank.com> | 2013-09-25 13:04:48 -0700 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2013-09-25 13:04:48 -0700 |
commit | 25e15b76b4213b427ef11056db979a42039d3f7b (patch) | |
tree | 30b3031f50f28a1e48c846fe2299170ece249c35 | |
parent | c8cae87e9e08468cc86145e0fd60c05d12826239 (diff) | |
download | ceph-25e15b76b4213b427ef11056db979a42039d3f7b.tar.gz |
ceph_json: use different string constructor for parser bufferwip-6397
Fixes: #6397
Previous implementation did not user the constructor with the length
param.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r-- | src/common/ceph_json.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/ceph_json.cc b/src/common/ceph_json.cc index 84355575c6c..609d134ce5a 100644 --- a/src/common/ceph_json.cc +++ b/src/common/ceph_json.cc @@ -222,7 +222,7 @@ bool JSONParser::parse(const char *buf_, int len) return false; } - string json_string = buf_; + string json_string(buf_, len); // make a substring to len json_string = json_string.substr(0, len); success = read(json_string, data); |