]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/Formatter: fix string_view usage for {json,xml}_stream_escaper 21317/head
authorSage Weil <sage@redhat.com>
Tue, 10 Apr 2018 03:25:17 +0000 (22:25 -0500)
committerSage Weil <sage@redhat.com>
Tue, 10 Apr 2018 03:40:58 +0000 (22:40 -0500)
commit54f1e4e614dcd185d28c5644fc049a6ea2838d12
tree8a2ea83c8267ccc6d8364df0882478fe1e230af7
parent447a107d5f220852ffa0630f7b4515b30e2d0b2a
common/Formatter: fix string_view usage for {json,xml}_stream_escaper

These are passing a simple const char* without a length, which breaks for
binary strings with \0 in them.

Broken by b40f76a7a0cf460f2a851b001885a4831a6f6503.

This code is still a mess because there is a mix of boost::string_view
and std::string_view throughout the code.  A cleanup is in order!

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/Formatter.cc
src/common/HTMLFormatter.cc
src/common/escape.h
src/test/escape.cc