summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Herbszt <herbszt@gmx.de>2014-11-26 23:03:23 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2014-11-26 23:51:46 (GMT)
commit30f0eeed578a1606eb53e135c1c5417d61d56295 (patch)
tree0b2205eeb1faa129b2cf549ca82cf7a31124050d
parenta4a1b37be0ff96492d13e87ce59c82482d961f56 (diff)
downloadmonitoring-plugins-30f0eeed578a1606eb53e135c1c5417d61d56295.tar.gz
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@gmx.de>
-rw-r--r--plugins/check_real.c2
1 files changed, 1 insertions, 1 deletions
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)
178 178
179 /* watch for the REAL connection string */ 179 /* watch for the REAL connection string */
180 result = recv (sd, buffer, MAX_INPUT_BUFFER - 1, 0); 180 result = recv (sd, buffer, MAX_INPUT_BUFFER - 1, 0);
181 buffer[result] = "\0"; /* null terminate recieved buffer */ 181 buffer[result] = '\0'; /* null terminate recieved buffer */
182 182
183 /* return a CRITICAL status if we couldn't read any data */ 183 /* return a CRITICAL status if we couldn't read any data */
184 if (result == -1) { 184 if (result == -1) {