From 7fc8312c64fc6a507387b228fdc1e5ae122432d0 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 7 Nov 2026 14:27:52 +0100 Subject: [PATCH] Fix ci_test_clang_sanitizer: build the CBOR test string from bytes (#6037) --- tests/src/unit-file_input.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/unit-file_input.cpp b/tests/src/unit-file_input.cpp index f74f23267..ce190dfed 100644 --- a/tests/src/unit-file_input.cpp +++ b/tests/src/unit-file_input.cpp @@ -351,7 +351,7 @@ TEST_CASE("parsing from a FILE*") { CAPTURE(size) std::vector buffer(static_cast(size)); - const file_ptr f = open_with(name, std::string(cbor.begin(), cbor.end())); + const file_ptr f = open_with(name, std::string(reinterpret_cast(cbor.data()), cbor.size())); REQUIRE(f != nullptr); REQUIRE(std::setvbuf(f.get(), buffer.data(), _IOFBF, buffer.size()) == 0); CHECK(json::from_cbor(f.get()) == value);