Explorar o código

fix for segfault when check_nrpe configuration file does not ends with newline issue#153 (#154)

Pavel Rochnyak %!s(int64=8) %!d(string=hai) anos
pai
achega
c5253cf632
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/check_nrpe.c

+ 2 - 0
src/check_nrpe.c

@@ -580,6 +580,8 @@ int read_config_file(char *fname)
 		argv[argc] = my_strsep(&bufp, delims);
 		if (!argv[argc++])
 			break;
+		if (!bufp)
+			break;
 	}
 
 	fclose(f);