Module: check_mk
Branch: master
Commit: 4df94f128f51cf53c3b32e5dd0eebdb747144a12
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4df94f128f51cf…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Fri Nov 6 14:29:27 2015 +0100
windows agent: fixed three cases of va_start not being matched by a va_end
---
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent-64.exe | Bin 5359530 -> 5361545 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 5359530 -> 5361545 bytes
agents/windows/check_mk_agent.cc | 9 ++++++---
agents/windows/check_mk_agent.exe | Bin 4220996 -> 4223010 bytes
agents/windows/check_mk_agent.msi | Bin 9904128 -> 9908224 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 4220996 -> 4223010 bytes
agents/windows/install_agent-64.exe | Bin 1278363 -> 1278652 bytes
agents/windows/install_agent.exe | Bin 1161435 -> 1161631 bytes
9 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/agents/windows/build_version b/agents/windows/build_version
index 51e227a..bb33380 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-644
+646
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index 4370941..91db67c 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.unversioned.exe
b/agents/windows/check_mk_agent-64.unversioned.exe
index 7f45f08..00a3947 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.cc b/agents/windows/check_mk_agent.cc
index 7b7b70e..b74f3b7 100644
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -268,6 +268,7 @@ void verbose(const char *format, ...)
va_start(ap, format);
printf("DEBUG: ");
vprintf(format, ap);
+ va_end(ap);
printf("\n");
fflush(stdout);
}
@@ -3247,15 +3248,16 @@ void crash_log(const char *format, ...)
ellapsed_sec --;
}
- va_list ap;
- va_start(ap, format);
-
DWORD dwBytesWritten = 0;
snprintf(buffer, sizeof(buffer), "%ld.%06ld ", ellapsed_sec,
ellapsed_usec);
DWORD dwBytesToWrite = (DWORD)strlen(buffer);
WriteFile(g_connectionlog_file, buffer, dwBytesToWrite, &dwBytesWritten,
NULL);
+ va_list ap;
+ va_start(ap, format);
vsnprintf(buffer, sizeof(buffer), format, ap);
+ va_end(ap);
+
dwBytesToWrite = (DWORD)strlen(buffer);
WriteFile(g_connectionlog_file, buffer, dwBytesToWrite, &dwBytesWritten,
NULL);
@@ -3333,6 +3335,7 @@ void output(SOCKET &out, const char *format, ...)
va_list ap;
va_start(ap, format);
int written_len = vsnprintf(outbuffer + len, sizeof(outbuffer) - len, format, ap);
+ va_end(ap);
len += written_len;
// We do not send out the data immediately
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index 76d62bf..e872661 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 7b5043c..6a2e31a 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.unversioned.exe
b/agents/windows/check_mk_agent.unversioned.exe
index b58cef8..2b9cce5 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 b5e0211..444c69c 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 59cb8fa..c0ae7a4 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ