projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix: 1 byte overflow in UuidView
[babeltrace.git]
/
src
/
cpp-common
/
uuid-view.hpp
diff --git
a/src/cpp-common/uuid-view.hpp
b/src/cpp-common/uuid-view.hpp
index 78116642a6186e87d2d8d673c84cdde739f75d7c..31b641e6bb7c96412a0895c037e2fa325f84aa77 100644
(file)
--- a/
src/cpp-common/uuid-view.hpp
+++ b/
src/cpp-common/uuid-view.hpp
@@
-37,10
+37,12
@@
public:
std::string string() const
{
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
}
static std::size_t size() noexcept
This page took
0.026405 seconds
and
4
git commands to generate.