[monitoring-plugins] check_real: fix null termination

Holger Weiss git at monitoring-plugins.org
Thu Nov 27 01:00:08 CET 2014


    Module: monitoring-plugins
    Branch: maint
    Commit: 30f0eeed578a1606eb53e135c1c5417d61d56295
    Author: Sebastian Herbszt <herbszt at gmx.de>
 Committer: Holger Weiss <holger at zedat.fu-berlin.de>
      Date: Thu Nov 27 00:03:23 2014 +0100
       URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=30f0eee

check_real: fix null termination

Fix null termination introduced by commit b61f51a ("plugins/check_real.c - recv string null terminate").

Signed-off-by: Sebastian Herbszt <herbszt at gmx.de>

---

 plugins/check_real.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/check_real.c b/plugins/check_real.c
index 36f6413..1816bf5 100644
--- a/plugins/check_real.c
+++ b/plugins/check_real.c
@@ -178,7 +178,7 @@ main (int argc, char **argv)
 
 		/* watch for the REAL connection string */
 		result = recv (sd, buffer, MAX_INPUT_BUFFER - 1, 0);
-		buffer[result] = "\0"; /* null terminate recieved buffer */
+		buffer[result] = '\0'; /* null terminate recieved buffer */
 
 		/* return a CRITICAL status if we couldn't read any data */
 		if (result == -1) {



More information about the Commits mailing list