Skip to content

Commit 172a22f

Browse files
committed
Fix tls plugin error
1 parent ce36f1f commit 172a22f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/plugins/process/tls/src/tls.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ static std::string concatenate_vector_to_string(const std::vector<uint16_t>& vec
130130

131131
static std::string concatenate_vector_to_hex_string(const std::vector<uint16_t>& vector)
132132
{
133+
if (vector.empty()) {
134+
return "";
135+
}
133136
auto res = std::accumulate(
134137
vector.begin(),
135138
vector.end(),
@@ -146,6 +149,9 @@ static std::string concatenate_vector_to_hex_string(const std::vector<uint16_t>&
146149
static std::string
147150
concatenate_extensions_vector_to_string(const std::vector<TLSExtension>& extensions)
148151
{
152+
if (extensions.empty()) {
153+
return "";
154+
}
149155
auto res = std::accumulate(
150156
extensions.begin(),
151157
extensions.end(),

0 commit comments

Comments
 (0)