Module: check_mk
Branch: master
Commit: 79338f203d47b2af91270a9a3c0a067a2eca2c9d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=79338f203d47b2…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon Jun 6 08:21:00 2016 +0200
Fetched Livestatus from downstream.
---
livestatus/src/PerfdataAggregator.cc | 1 +
livestatus/src/Query.cc | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/livestatus/src/PerfdataAggregator.cc b/livestatus/src/PerfdataAggregator.cc
index b318e79..54adbba 100644
--- a/livestatus/src/PerfdataAggregator.cc
+++ b/livestatus/src/PerfdataAggregator.cc
@@ -40,6 +40,7 @@ using std::vector;
void PerfdataAggregator::consume(void *data, Query * /*unused*/) {
string perf_data = _column->getValue(data);
vector<char> perf_data_vec(perf_data.begin(), perf_data.end());
+ perf_data_vec.push_back('\0');
char *scan = &perf_data_vec[0];
char *entry;
diff --git a/livestatus/src/Query.cc b/livestatus/src/Query.cc
index 154fc64..b1a1ed7 100644
--- a/livestatus/src/Query.cc
+++ b/livestatus/src/Query.cc
@@ -93,7 +93,7 @@ Query::Query(const list<string> &lines, OutputBuffer *output,
Table *table)
, _timezone_offset(0) {
for (auto &line : lines) {
vector<char> line_copy(line.begin(), line.end());
- line_copy.push_back(0);
+ line_copy.push_back('\0');
char *buffer = &line_copy[0];
rstrip(buffer);
if (g_debug_level > 0) {