]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw/kms/vault - 0 terminate before rapidjson
authorMarcus Watts <mwatts@redhat.com>
Fri, 8 Jan 2021 22:43:58 +0000 (17:43 -0500)
committerMarcus Watts <mwatts@redhat.com>
Wed, 10 Mar 2021 01:32:46 +0000 (20:32 -0500)
commit5ec24bb7c95505d6b9c16c45252076952fa0cde4
tree33de45c70a99856c0f8e3fbc423744d1130b42a1
parent1bbbb605aae82d78641a21f9d30b6e381ed351aa
rgw/kms/vault - 0 terminate before rapidjson

bufferlist c_str() doesn't guarantee a trailing nul, which is req'd
by rapidjson.  So, append a nul to make that guarantee explicit.

Also, add an optional "virtual" so unit test logic can override
send_request().

Fixes: http://tracker.ceph.com/issues/48746
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 30ee3d473bed7318491fc28c7eaa66e8b7633c75)
src/rgw/rgw_kms.cc