Module: check_mk
Branch: master
Commit: fe2d6ccb8bc306fd2ded85368a69ad1fd3400052
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fe2d6ccb8bc306…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jun 29 12:08:09 2017 +0200
4839 FIX windows agents: fixed invalid hieroglyps in agent output, when plugin output
includes FF FE byte order mark
Change-Id: I6aa92a6ebc2838fb933fa89c3fe1c6562c7ee92d
---
.werks/4839 | 10 ++++++++++
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent-64.exe | Bin 1369600 -> 1339904 bytes
agents/windows/check_mk_agent-64.unstripped.exe | Bin 17208624 -> 15823277 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 1369600 -> 1339904 bytes
agents/windows/check_mk_agent.exe | Bin 1351680 -> 1317888 bytes
agents/windows/check_mk_agent.msi | Bin 2992128 -> 2927616 bytes
agents/windows/check_mk_agent.unstripped.exe | Bin 15041453 -> 13681693 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 1351680 -> 1317888 bytes
agents/windows/install_agent-64.exe | Bin 603781 -> 591863 bytes
agents/windows/install_agent.exe | Bin 603278 -> 589498 bytes
agents/windows/sections/SectionPluginGroup.cc | 4 ++--
12 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/.werks/4839 b/.werks/4839
new file mode 100644
index 0000000..8af9169
--- /dev/null
+++ b/.werks/4839
@@ -0,0 +1,10 @@
+Title: windows agents: fixed invalid hieroglyps in agent output, when plugin output
includes FF FE byte order mark
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1498730806
+Class: fix
+
+One candidate for this error was the windows_updates.vbs plugin.
diff --git a/agents/windows/build_version b/agents/windows/build_version
index 3c6eb2a..07dcacc 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-2715
+2800
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index 0860858..9842480 100755
Binary files a/agents/windows/check_mk_agent-64.exe and
b/agents/windows/check_mk_agent-64.exe differ
diff --git a/agents/windows/check_mk_agent-64.unstripped.exe
b/agents/windows/check_mk_agent-64.unstripped.exe
index e4a9ed5..6a6935d 100755
Binary files a/agents/windows/check_mk_agent-64.unstripped.exe and
b/agents/windows/check_mk_agent-64.unstripped.exe differ
diff --git a/agents/windows/check_mk_agent-64.unversioned.exe
b/agents/windows/check_mk_agent-64.unversioned.exe
index ddf6f3a..288d4bf 100755
Binary files a/agents/windows/check_mk_agent-64.unversioned.exe and
b/agents/windows/check_mk_agent-64.unversioned.exe differ
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index fe6d16f..855f556 100755
Binary files a/agents/windows/check_mk_agent.exe and b/agents/windows/check_mk_agent.exe
differ
diff --git a/agents/windows/check_mk_agent.msi b/agents/windows/check_mk_agent.msi
index 25fd387..800596e 100755
Binary files a/agents/windows/check_mk_agent.msi and b/agents/windows/check_mk_agent.msi
differ
diff --git a/agents/windows/check_mk_agent.unstripped.exe
b/agents/windows/check_mk_agent.unstripped.exe
index 19d5b5e..cb22bb3 100755
Binary files a/agents/windows/check_mk_agent.unstripped.exe and
b/agents/windows/check_mk_agent.unstripped.exe differ
diff --git a/agents/windows/check_mk_agent.unversioned.exe
b/agents/windows/check_mk_agent.unversioned.exe
index 06ce1f3..3baaa64 100755
Binary files a/agents/windows/check_mk_agent.unversioned.exe and
b/agents/windows/check_mk_agent.unversioned.exe differ
diff --git a/agents/windows/install_agent-64.exe b/agents/windows/install_agent-64.exe
index 8a7134b..2f47628 100755
Binary files a/agents/windows/install_agent-64.exe and
b/agents/windows/install_agent-64.exe differ
diff --git a/agents/windows/install_agent.exe b/agents/windows/install_agent.exe
index 6f923a9..45e8927 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ
diff --git a/agents/windows/sections/SectionPluginGroup.cc
b/agents/windows/sections/SectionPluginGroup.cc
index 30e52a4..c8dc3e7 100644
--- a/agents/windows/sections/SectionPluginGroup.cc
+++ b/agents/windows/sections/SectionPluginGroup.cc
@@ -138,9 +138,9 @@ static int launch_program(script_container *cont) {
reinterpret_cast<unsigned char *>(cont->buffer_work);
if ((buf_u[0] == 0xFF) && (buf_u[1] == 0xFE)) {
wchar_t *buffer_u16 =
- reinterpret_cast<wchar_t *>(cont->buffer_work);
+ reinterpret_cast<wchar_t *>(cont->buffer_work + 2);
std::string buffer_u8 = to_utf8(buffer_u16);
- HeapFree(GetProcessHeap(), 0, buffer_u16);
+ HeapFree(GetProcessHeap(), 0, cont->buffer_work);
cont->buffer_work =
(char *)HeapAlloc(GetProcessHeap(), 0, buffer_u8.size() + 1);
memcpy(cont->buffer_work, buffer_u8.c_str(), buffer_u8.size() + 1);