fix: 1 byte overflow in UuidView
[babeltrace.git] / src / cpp-common / uuid-view.hpp
index 78116642a6186e87d2d8d673c84cdde739f75d7c..31b641e6bb7c96412a0895c037e2fa325f84aa77 100644 (file)
@@ -37,10 +37,12 @@ public:
 
     std::string string() const
     {
-        std::array<char, BT_UUID_STR_LEN> buf;
+        std::string s;
 
-        bt_uuid_to_str(_mUuid, buf.data());
-        return {buf.data(), buf.size()};
+        s.resize(BT_UUID_STR_LEN);
+        bt_uuid_to_str(_mUuid, s.data());
+
+        return s;
     }
 
     static std::size_t size() noexcept
This page took 0.0237 seconds and 4 git commands to generate.