Ver Fonte

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

Pavel Rochnyak há 8 anos atrás
pai
commit
c5253cf632
1 ficheiros alterados com 2 adições e 0 exclusões
  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);