From 358c4de0bd473bdeb76602970d049b53944fa4dd Mon Sep 17 00:00:00 2001 From: faluco Date: Wed, 17 Mar 2021 13:03:19 +0100 Subject: [PATCH] Fix a valgrind issue in a unit test in log_channel_test where the buffer was not being null terminated. --- lib/test/srslog/log_channel_test.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/test/srslog/log_channel_test.cpp b/lib/test/srslog/log_channel_test.cpp index 3fa24fb7c..84adf8293 100644 --- a/lib/test/srslog/log_channel_test.cpp +++ b/lib/test/srslog/log_channel_test.cpp @@ -288,6 +288,7 @@ when_logging_with_small_string_then_filled_in_log_entry_is_pushed_into_the_backe small_str_buffer buf; fmt::format_to(buf, "A {} {} {}", 1, 2, 3); + buf.push_back('\0'); log(std::move(buf)); ASSERT_EQ(backend.push_invocation_count(), 1);