Module: check_mk
Branch: master
Commit: 0a503a754369cfadf376b3ad7eddae1f3a662bbe
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0a503a754369cf…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Sep 10 08:45:18 2013 +0200
windows agent: fixed bug with plugin output buffer size
---
ChangeLog | 1 +
agents/windows/check_mk_agent.cc | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index bc26597..5cf7d51 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -80,6 +80,7 @@
* FIX: cisco_qos: Catch policies without individual bandwidth limits
* mk-job: /var/lib/check_mk_agent/job directory is now created with mode 1777 so
mk-job can be used by unprivileged users too
+ * windows_agent: fixed bug on merging plugin output buffers
Notifications:
* notify.py: Matching service level: Use the hosts service level if a
diff --git a/agents/windows/check_mk_agent.cc b/agents/windows/check_mk_agent.cc
index da4be44..e495e2f 100755
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -2299,7 +2299,7 @@ int launch_program(script_container* cont)
if (bread > 0) {
memset(buf, 0, sizeof(buf));
- ReadFile(read_stdout, buf, sizeof(buf), &bread, NULL);
+ ReadFile(read_stdout, buf, sizeof(buf) - 1, &bread, NULL);
out_offset += snprintf(cont->buffer_work + out_offset,
current_heap_size - out_offset, buf);
}
}