Module: check_mk
Branch: master
Commit: 624f6baaa4af9df377e6b735cdf42dde586025d3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=624f6baaa4af9d…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Dec 17 10:35:00 2015 +0100
0-terminate copy. Improved naming.
---
livestatus/src/Query.cc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/livestatus/src/Query.cc b/livestatus/src/Query.cc
index 86e9b85..4f824c8 100644
--- a/livestatus/src/Query.cc
+++ b/livestatus/src/Query.cc
@@ -79,8 +79,9 @@ Query::Query(InputBuffer *input, OutputBuffer *output, Table *table) :
while (input->moreLines())
{
string line = input->nextLine();
- vector<char> hurz(line.begin(), line.end());
- char *buffer = &hurz[0];
+ vector<char> line_copy(line.begin(), line.end());
+ line_copy.push_back(0);
+ char *buffer = &line_copy[0];
rstrip(buffer);
if (g_debug_level > 0)
logger(LG_INFO, "Query: %s", buffer);