]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw: fix string_view formatting in RGWFormatter_Plain
authorCasey Bodley <cbodley@redhat.com>
Thu, 5 Mar 2020 16:32:43 +0000 (11:32 -0500)
committerCasey Bodley <cbodley@redhat.com>
Thu, 5 Mar 2020 16:32:45 +0000 (11:32 -0500)
commitab3395e1df9b0ff557561a2431ca3624d7a4a1d0
treebac6cd7d7cfc5e20daf8740535e7f76ac5eed935
parent411b0239164c7de6b7e6c57249b1e8581757afc9
rgw: fix string_view formatting in RGWFormatter_Plain

two string_views were being passed directly to vsnprintf where it
expected null-terminated strings. the compiler didn't catch this, and
resulted in segfaults

string_views aren't guaranteed to be null-terminated, so printf formats
have to specify a length as well

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_formats.cc