Explorar el Código

Merge branch 'cov-66525' into coverity

Spenser Reinhardt hace 11 años
padre
commit
a185939dd9
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      plugins/check_real.c

+ 1 - 0
plugins/check_real.c

@@ -178,6 +178,7 @@ main (int argc, char **argv)
 
 
 		/* watch for the REAL connection string */
 		/* watch for the REAL connection string */
 		result = recv (sd, buffer, MAX_INPUT_BUFFER - 1, 0);
 		result = recv (sd, buffer, MAX_INPUT_BUFFER - 1, 0);
+		buffer[result] = "\0"; /* null terminate recieved buffer */
 
 
 		/* return a CRITICAL status if we couldn't read any data */
 		/* return a CRITICAL status if we couldn't read any data */
 		if (result == -1) {
 		if (result == -1) {