]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
<comomon> fix buffer out-of-bounds in HTMLFormatter 61105/head
authorliubingrun <liubr1@chinatelecom.cn>
Thu, 24 Oct 2024 10:19:28 +0000 (06:19 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 16 Dec 2024 18:21:36 +0000 (13:21 -0500)
commit6739a4c63b8bf580bca50bd0638343a5af872233
tree272c1114ef8ba569ae199b7c147ecda0631499a3
parentc88550c7b8fcfeabb79fa95c37c9d5d692de5ba2
<comomon> fix buffer out-of-bounds in HTMLFormatter

Use boost small_vector to allocate more buffer when content is too
long to fit in the buffer pre-alloced

A unittest is also added.

Signed-off-by: liubingrun <liubr1@chinatelecom.cn>
(cherry picked from commit 38601d0c9ea0b6fe32a27cebeb34ec785c7df676)
src/common/HTMLFormatter.cc
src/test/common/CMakeLists.txt
src/test/common/test_htmlformatter.cc [new file with mode: 0644]