diff options
Diffstat (limited to 'src/common/ceph_json.cc')
-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); |