From: Radoslaw Zarzynski Date: Wed, 2 Dec 2020 07:21:30 +0000 (+0100) Subject: librbd: use the ceph_memzero_s() wrapper instead of explicit_bzero(). X-Git-Tag: v16.1.0~397^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F38385%2Fhead;p=ceph.git librbd: use the ceph_memzero_s() wrapper instead of explicit_bzero(). Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/librbd/crypto/luks/FormatRequest.cc b/src/librbd/crypto/luks/FormatRequest.cc index 74e6002834d3..7bf77dff8862 100644 --- a/src/librbd/crypto/luks/FormatRequest.cc +++ b/src/librbd/crypto/luks/FormatRequest.cc @@ -135,7 +135,7 @@ void FormatRequest::handle_write_header(int r) { template void FormatRequest::finish(int r) { - explicit_bzero(&m_passphrase[0], m_passphrase.size()); + ceph_memzero_s(&m_passphrase[0], m_passphrase.capacity(), m_passphrase.size()); m_on_finish->complete(r); delete this; }