Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/nsca-ng-1.6/lib/daemon.c
Examining data/nsca-ng-1.6/lib/ev/ev.c
Examining data/nsca-ng-1.6/lib/ev/ev.h
Examining data/nsca-ng-1.6/lib/ev/ev_epoll.c
Examining data/nsca-ng-1.6/lib/ev/ev_kqueue.c
Examining data/nsca-ng-1.6/lib/ev/ev_poll.c
Examining data/nsca-ng-1.6/lib/ev/ev_port.c
Examining data/nsca-ng-1.6/lib/ev/ev_select.c
Examining data/nsca-ng-1.6/lib/ev/ev_vars.h
Examining data/nsca-ng-1.6/lib/ev/ev_win32.c
Examining data/nsca-ng-1.6/lib/ev/ev_wrap.h
Examining data/nsca-ng-1.6/lib/pidfile/flock.c
Examining data/nsca-ng-1.6/lib/pidfile/flopen.c
Examining data/nsca-ng-1.6/lib/pidfile/libutil.h
Examining data/nsca-ng-1.6/lib/pidfile/pidfile.c
Examining data/nsca-ng-1.6/lib/progname.c
Examining data/nsca-ng-1.6/lib/strcasecmp.c
Examining data/nsca-ng-1.6/lib/strdup.c
Examining data/nsca-ng-1.6/lib/strncasecmp.c
Examining data/nsca-ng-1.6/lib/system.h
Examining data/nsca-ng-1.6/lib/wrappers.c
Examining data/nsca-ng-1.6/lib/wrappers.h
Examining data/nsca-ng-1.6/lib/xprintf.c
Examining data/nsca-ng-1.6/perl/client.c
Examining data/nsca-ng-1.6/perl/client.h
Examining data/nsca-ng-1.6/perl/ppport.h
Examining data/nsca-ng-1.6/perl/uthash.h
Examining data/nsca-ng-1.6/python/client.c
Examining data/nsca-ng-1.6/python/client.h
Examining data/nsca-ng-1.6/python/nscang.c
Examining data/nsca-ng-1.6/python/uthash.h
Examining data/nsca-ng-1.6/src/client/auth.c
Examining data/nsca-ng-1.6/src/client/auth.h
Examining data/nsca-ng-1.6/src/client/client.c
Examining data/nsca-ng-1.6/src/client/client.h
Examining data/nsca-ng-1.6/src/client/conf.c
Examining data/nsca-ng-1.6/src/client/conf.h
Examining data/nsca-ng-1.6/src/client/input.c
Examining data/nsca-ng-1.6/src/client/input.h
Examining data/nsca-ng-1.6/src/client/parse.c
Examining data/nsca-ng-1.6/src/client/parse.h
Examining data/nsca-ng-1.6/src/client/send_nsca.c
Examining data/nsca-ng-1.6/src/client/send_nsca.h
Examining data/nsca-ng-1.6/src/common/buffer.c
Examining data/nsca-ng-1.6/src/common/buffer.h
Examining data/nsca-ng-1.6/src/common/log.c
Examining data/nsca-ng-1.6/src/common/log.h
Examining data/nsca-ng-1.6/src/common/tls.c
Examining data/nsca-ng-1.6/src/common/tls.h
Examining data/nsca-ng-1.6/src/common/util.c
Examining data/nsca-ng-1.6/src/common/util.h
Examining data/nsca-ng-1.6/src/server/auth.c
Examining data/nsca-ng-1.6/src/server/auth.h
Examining data/nsca-ng-1.6/src/server/conf.c
Examining data/nsca-ng-1.6/src/server/conf.h
Examining data/nsca-ng-1.6/src/server/fifo.c
Examining data/nsca-ng-1.6/src/server/fifo.h
Examining data/nsca-ng-1.6/src/server/hash.c
Examining data/nsca-ng-1.6/src/server/hash.h
Examining data/nsca-ng-1.6/src/server/nsca-ng.c
Examining data/nsca-ng-1.6/src/server/server.c
Examining data/nsca-ng-1.6/src/server/server.h
Examining data/nsca-ng-1.6/tests/test_nsca.c

FINAL RESULTS:

data/nsca-ng-1.6/lib/ev/ev.c:4304:11:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
          strcpy (path, w->path);
data/nsca-ng-1.6/lib/xprintf.c:1244:8:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	len = vsnprintf(NULL, 0, format, aq);
data/nsca-ng-1.6/lib/xprintf.c:1248:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	return vsnprintf(*ret, size, format, ap);
data/nsca-ng-1.6/lib/xprintf.c:1273:8:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	len = vsnprintf(str, size, format, ap);
data/nsca-ng-1.6/perl/client.c:109:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(c->identity, identity);
data/nsca-ng-1.6/perl/client.c:110:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(c->psk, psk);
data/nsca-ng-1.6/perl/ppport.h:7380:14:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    retval = vsnprintf(buffer, len, format, ap);
data/nsca-ng-1.6/perl/ppport.h:7382:14:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    retval = vsprintf(buffer, format, ap);
data/nsca-ng-1.6/perl/ppport.h:7411:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(buffer, pat, args);
data/nsca-ng-1.6/perl/uthash.h:399:29:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0)
data/nsca-ng-1.6/python/client.c:124:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(c->identity, identity);
data/nsca-ng-1.6/python/client.c:125:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(c->psk, psk);
data/nsca-ng-1.6/python/uthash.h:399:29:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0)
data/nsca-ng-1.6/src/client/send_nsca.c:299:10:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			(void)strcpy(numeric, sequence);
data/nsca-ng-1.6/src/common/log.c:120:6:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	if (vsnprintf(message, sizeof(message), out_fmt, ap)
data/nsca-ng-1.6/src/server/nsca-ng.c:150:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(cfg_getstr(cfg, "temp_directory"), X_OK | W_OK) == -1)
data/nsca-ng-1.6/src/server/nsca-ng.c:233:3:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execvp(argv[0], argv);
data/nsca-ng-1.6/tests/test_nsca.c:116:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(CLIENT_CONF_FILE, F_OK) == -1)
data/nsca-ng-1.6/tests/test_nsca.c:118:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(SERVER_CONF_FILE, F_OK) == -1)
data/nsca-ng-1.6/tests/test_nsca.c:193:8:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	(void)strcpy(joined, part1);
data/nsca-ng-1.6/tests/test_nsca.c:202:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		(void)strcat(joined, part2);
data/nsca-ng-1.6/tests/test_nsca.c:212:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	if ((status = system(command)) == -1)
data/nsca-ng-1.6/tests/test_nsca.c:335:8:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	(void)system("send_nsca -V");
data/nsca-ng-1.6/tests/test_nsca.c:336:8:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	(void)system("nsca-ng -V");
data/nsca-ng-1.6/tests/test_nsca.c:372:8:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	(void)vfprintf(stderr, format, ap);
data/nsca-ng-1.6/lib/ev/ev.c:2887:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
          && getenv ("LIBEV_FLAGS"))
data/nsca-ng-1.6/lib/ev/ev.c:2888:23:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        flags = atoi (getenv ("LIBEV_FLAGS"));
data/nsca-ng-1.6/perl/client.c:306:2:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srandom(time(NULL));
data/nsca-ng-1.6/perl/client.c:307:60:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	len = snprintf(cmd, sizeof(cmd), "MOIN 1 %08ld%08ld\r\n", random(),
data/nsca-ng-1.6/perl/client.c:308:6:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	    random());
data/nsca-ng-1.6/python/client.c:345:2:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srandom(time(NULL));
data/nsca-ng-1.6/python/client.c:346:60:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	len = snprintf(cmd, sizeof(cmd), "MOIN 1 %08ld%08ld\r\n", random(),
data/nsca-ng-1.6/python/client.c:347:6:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	    random());
data/nsca-ng-1.6/src/client/send_nsca.c:161:19:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((option = getopt(argc, argv, "Cc:D:d:e:H:ho:p:SstVv")) != -1) {
data/nsca-ng-1.6/src/server/nsca-ng.c:265:19:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((option = getopt(argc, argv, "b:C:c:Fhl:P:SsV")) != -1)
data/nsca-ng-1.6/src/server/nsca-ng.c:365:27:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
	if (new_root != NULL && (chroot(new_root) == -1 || chdir("/") == -1))
data/nsca-ng-1.6/src/server/nsca-ng.c:413:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if ((usec = getenv("WATCHDOG_USEC")) != NULL
data/nsca-ng-1.6/tests/test_nsca.c:134:40:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	run_command(join(SERVER_COMMAND_LINE, getenv("NSCA_SERVER_FLAGS")));
data/nsca-ng-1.6/tests/test_nsca.c:137:40:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	run_command(join(CLIENT_COMMAND_LINE, getenv("NSCA_CLIENT_FLAGS")));
data/nsca-ng-1.6/tests/test_nsca.c:163:19:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((option = getopt(argc, argv, "hl:V")) != -1)
data/nsca-ng-1.6/lib/daemon.c:71:24:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
data/nsca-ng-1.6/lib/ev/ev.c:468:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char pad[128 - sizeof (uint32_t)];
data/nsca-ng-1.6/lib/ev/ev.c:1357:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (&r, &x, 4);
data/nsca-ng-1.6/lib/ev/ev.c:1397:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (&r, &x, 4);
data/nsca-ng-1.6/lib/ev/ev.c:1427:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (&r, &x, 8);
data/nsca-ng-1.6/lib/ev/ev.c:1467:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (&r, &x, 8);
data/nsca-ng-1.6/lib/ev/ev.c:2513:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          char dummy[4];
data/nsca-ng-1.6/lib/ev/ev.c:2888:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        flags = atoi (getenv ("LIBEV_FLAGS"));
data/nsca-ng-1.6/lib/ev/ev.c:4303:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          char path [4096];
data/nsca-ng-1.6/lib/ev/ev.c:4385:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf [EV_INOTIFY_BUFSIZE];
data/nsca-ng-1.6/lib/ev/ev.c:5075:34:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            cb (EV_A_ EV_STAT, ((char *)ANHE_w (timers [i])) - offsetof (struct ev_stat, timer));
data/nsca-ng-1.6/lib/ev/ev_select.c:155:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy (vec_ro, vec_ri, fd_setsize);
data/nsca-ng-1.6/lib/ev/ev_select.c:156:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy (vec_wo, vec_wi, fd_setsize);
data/nsca-ng-1.6/lib/ev/ev_select.c:164:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy (vec_eo, vec_wi, fd_setsize);
data/nsca-ng-1.6/lib/pidfile/flopen.c:77:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((fd = open(path, flags, mode)) == -1)
data/nsca-ng-1.6/lib/pidfile/pidfile.c:61:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	pf_path[MAXPATHLEN + 1];
data/nsca-ng-1.6/lib/pidfile/pidfile.c:88:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[16], *endptr;
data/nsca-ng-1.6/lib/pidfile/pidfile.c:91:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(path, O_RDONLY);
data/nsca-ng-1.6/lib/pidfile/pidfile.c:186:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pidstr[16];
data/nsca-ng-1.6/lib/strdup.c:45:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	return memcpy(new, string, size);
data/nsca-ng-1.6/lib/xprintf.c:718:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char iconvert[MAX_CONVERT_LENGTH];
data/nsca-ng-1.6/lib/xprintf.c:823:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char iconvert[MAX_CONVERT_LENGTH];
data/nsca-ng-1.6/lib/xprintf.c:824:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char fconvert[MAX_CONVERT_LENGTH];
data/nsca-ng-1.6/lib/xprintf.c:825:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char econvert[4];	/* "e-12" (without nul-termination). */
data/nsca-ng-1.6/perl/client.c:188:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1024];
data/nsca-ng-1.6/perl/client.c:295:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cmd[64];
data/nsca-ng-1.6/perl/client.c:347:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char command_buf[1024];
data/nsca-ng-1.6/perl/client.c:348:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cmd[32];
data/nsca-ng-1.6/perl/client.c:413:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char command[1024];
data/nsca-ng-1.6/perl/client.h:66:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char errstr[1024];
data/nsca-ng-1.6/perl/ppport.h:4110:42:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  define CopyD(s,d,n,t)                 memcpy((char*)(d),(char*)(s), (n) * sizeof(t))
data/nsca-ng-1.6/perl/ppport.h:7235:38:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                && (xdigit = strchr((char *) PL_hexdigit, s[1])))
data/nsca-ng-1.6/perl/ppport.h:7457:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dst + used, src, copy);
data/nsca-ng-1.6/perl/ppport.h:7486:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dst, src, copy);
data/nsca-ng-1.6/perl/ppport.h:7578:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char octbuf[32] = "%123456789ABCDF";
data/nsca-ng-1.6/perl/ppport.h:7648:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char tmp[2];
data/nsca-ng-1.6/python/client.c:227:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1024];
data/nsca-ng-1.6/python/client.c:334:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cmd[64];
data/nsca-ng-1.6/python/client.c:370:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cmd[64], command[1024];
data/nsca-ng-1.6/python/client.h:46:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char errstr[1024];
data/nsca-ng-1.6/python/nscang.c:48:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char errstr[1024];
data/nsca-ng-1.6/python/nscang.c:81:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char errstr[1024];
data/nsca-ng-1.6/python/nscang.c:115:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char errstr[1024];
data/nsca-ng-1.6/src/client/auth.c:54:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	(void)memcpy(identity, configured_id, identity_len);
data/nsca-ng-1.6/src/client/auth.c:55:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	(void)memcpy(password, configured_pw, password_len);
data/nsca-ng-1.6/src/client/client.c:184:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *args[2];
data/nsca-ng-1.6/src/client/client.c:191:32:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		else if ((protocol_version = atoi(args[1])) <= 0)
data/nsca-ng-1.6/src/client/client.c:306:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char random_bytes[NUM_SESSION_ID_BYTES];
data/nsca-ng-1.6/src/client/client.c:328:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	(void)memcpy(output, mem_data, (size_t)output_size);
data/nsca-ng-1.6/src/client/conf.c:98:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char host_name[256];
data/nsca-ng-1.6/src/client/conf.c:178:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((f = fopen(path, "r")) == NULL)
data/nsca-ng-1.6/src/client/conf.c:184:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char quote_sign, value[2048];
data/nsca-ng-1.6/src/client/input.h:47:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char input[128];
data/nsca-ng-1.6/src/client/parse.c:68:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	const char *fields[4] = { NULL, NULL, NULL, NULL };
data/nsca-ng-1.6/src/client/send_nsca.c:174:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			opt->delay = atoi(optarg);
data/nsca-ng-1.6/src/client/send_nsca.c:201:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			opt->timeout = atoi(optarg);
data/nsca-ng-1.6/src/client/send_nsca.c:260:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char numeric[6]; /* Space for "0x345". */
data/nsca-ng-1.6/src/common/buffer.c:48:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char data[BUFFER_BLOCK_SIZE];
data/nsca-ng-1.6/src/common/buffer.c:103:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		(void)memcpy(buf->last->data + buf->end_offset, in, n);
data/nsca-ng-1.6/src/common/buffer.c:121:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		(void)memcpy(out, buf->first->data + buf->start_offset, n);
data/nsca-ng-1.6/src/common/log.c:76:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char message[LOG_BUFFER_SIZE], out_fmt[512];
data/nsca-ng-1.6/src/common/log.c:122:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		(void)memcpy(message + sizeof(message) - 7, " [...]", 7);
data/nsca-ng-1.6/src/common/util.c:63:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	(void)memcpy(catenated, str1, len1);
data/nsca-ng-1.6/src/common/util.c:64:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	(void)memcpy(catenated + len1, str2, len2);
data/nsca-ng-1.6/src/common/util.c:127:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char version_string[128];
data/nsca-ng-1.6/src/common/util.c:169:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char version_string[32];
data/nsca-ng-1.6/src/server/auth.c:78:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	(void)memcpy(password, configured_pw, password_len);
data/nsca-ng-1.6/src/server/auth.c:135:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char errbuf[128];
data/nsca-ng-1.6/src/server/conf.c:302:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char errbuf[128];
data/nsca-ng-1.6/src/server/fifo.c:239:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fifo->fd = open(fifo->path, O_WRONLY | O_NONBLOCK);
data/nsca-ng-1.6/src/server/fifo.c:541:23:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	if ((fifo->dump_fd = mkstemp(fifo->dump_file)) == -1) {
data/nsca-ng-1.6/src/server/fifo.c:595:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		(void)memcpy(new_output, fifo->output, fifo->output_size);
data/nsca-ng-1.6/src/server/nsca-ng.c:288:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			opt->log_level = atoi(optarg);
data/nsca-ng-1.6/src/server/nsca-ng.c:414:27:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    && (sec = (ev_tstamp)atol(usec) / 1000 / 1000) > 0.0) {
data/nsca-ng-1.6/src/server/server.c:157:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *args[3];
data/nsca-ng-1.6/src/server/server.c:166:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		} else if (atoi(args[1]) <= 0) {
data/nsca-ng-1.6/src/server/server.c:192:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *args[2];
data/nsca-ng-1.6/src/server/server.c:204:27:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		} else if ((data_size = atoi(args[1])) <= 0) {
data/nsca-ng-1.6/tests/test_nsca.c:131:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fd = open(COMMAND_FILE, O_RDONLY | O_NONBLOCK)) == -1)
data/nsca-ng-1.6/tests/test_nsca.c:169:30:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			if ((expected_num_lines = atol(optarg)) < 1)
data/nsca-ng-1.6/tests/test_nsca.c:187:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char joined[4096];
data/nsca-ng-1.6/tests/test_nsca.c:225:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((f = fopen(file, "w")) == NULL)
data/nsca-ng-1.6/tests/test_nsca.c:252:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fifo = fopen(COMMAND_FILE, "r");
data/nsca-ng-1.6/tests/test_nsca.c:291:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[64];
data/nsca-ng-1.6/tests/test_nsca.c:299:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((f = fopen(SERVER_PID_FILE, "r")) == NULL) {
data/nsca-ng-1.6/tests/test_nsca.c:308:25:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	else if ((pid = (pid_t)atol(buf)) < 1)
data/nsca-ng-1.6/lib/ev/ev.c:1681:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  write (STDERR_FILENO, msg, strlen (msg));
data/nsca-ng-1.6/lib/ev/ev.c:2508:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          read (evpipe [1], &counter, sizeof (uint64_t));
data/nsca-ng-1.6/lib/ev/ev.c:2522:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          read (evpipe [0], &dummy, sizeof (dummy));
data/nsca-ng-1.6/lib/ev/ev.c:2624:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      ssize_t res = read (sigfd, si, sizeof (si));
data/nsca-ng-1.6/lib/ev/ev.c:4301:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if ((errno == ENOENT || errno == EACCES) && strlen (w->path) < 4096)
data/nsca-ng-1.6/lib/ev/ev.c:4387:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int len = read (fs_fd, buf, sizeof (buf));
data/nsca-ng-1.6/lib/pidfile/pidfile.c:95:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	i = (int)read(fd, buf, sizeof(buf) - 1);
data/nsca-ng-1.6/lib/pidfile/pidfile.c:213:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (pwrite(fd, pidstr, strlen(pidstr), 0) != (ssize_t)strlen(pidstr)) {
data/nsca-ng-1.6/lib/pidfile/pidfile.c:213:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (pwrite(fd, pidstr, strlen(pidstr), 0) != (ssize_t)strlen(pidstr)) {
data/nsca-ng-1.6/lib/strdup.c:41:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t size = strlen(string) + 1;
data/nsca-ng-1.6/lib/wrappers.c:97:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(buf);
data/nsca-ng-1.6/perl/client.c:47:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(identity, c->identity, max_identity_length);
data/nsca-ng-1.6/perl/client.c:50:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy((char *)psk, c->psk, max_psk_length);
data/nsca-ng-1.6/perl/client.c:53:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		return strlen((char *)psk);
data/nsca-ng-1.6/perl/client.c:101:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	c->identity = malloc(strlen(identity) + 1);
data/nsca-ng-1.6/perl/client.c:102:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	c->psk = malloc(strlen(psk) + 1);
data/nsca-ng-1.6/perl/client.c:238:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(c->errstr, buf + 5, sizeof(c->errstr) - 1);
data/nsca-ng-1.6/perl/client.c:246:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(c->errstr, buf + 5, sizeof(c->errstr) - 1);
data/nsca-ng-1.6/perl/client.c:252:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(c->errstr, buf + 5, sizeof(c->errstr) - 1);
data/nsca-ng-1.6/perl/client.c:261:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(c->errstr, buf, sizeof(c->errstr) - 1);
data/nsca-ng-1.6/perl/client.c:346:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   const int command_len = strlen(command);
data/nsca-ng-1.6/perl/client.c:358:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
         strncpy(command_buf, command, sizeof(command_buf)-1);
data/nsca-ng-1.6/perl/client.c:369:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   len = strlen(command_buf);
data/nsca-ng-1.6/perl/client.c:380:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (!nscang_client_write(c, cmd, strlen(cmd), timeout))
data/nsca-ng-1.6/perl/client.c:443:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
   strncpy(buf, msg, buf_size);
data/nsca-ng-1.6/perl/client.c:445:4:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
   strncat(buf, ":", buf_size);
data/nsca-ng-1.6/perl/client.c:446:4:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
   strncat(buf, ERR_reason_error_string(ERR_peek_error()), buf_size);
data/nsca-ng-1.6/perl/client.c:469:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(buf, "Can't allocate memory", buf_size);
data/nsca-ng-1.6/perl/client.c:472:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(buf, "Timeout was reached", buf_size);
data/nsca-ng-1.6/perl/client.c:475:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(buf, "Protocol mismatch - too long response", buf_size);
data/nsca-ng-1.6/perl/client.c:482:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(buf, "Protocol mismatch - unexpected server response",
data/nsca-ng-1.6/perl/client.c:486:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(buf, "Protocol mismatch - unknown server response",
data/nsca-ng-1.6/perl/ppport.h:5631:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
data/nsca-ng-1.6/perl/ppport.h:5639:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#  define sv_vcatpvf(sv, pat, args)  sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
data/nsca-ng-1.6/perl/ppport.h:5643:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#  define sv_vsetpvf(sv, pat, args)  sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
data/nsca-ng-1.6/perl/ppport.h:5663:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/nsca-ng-1.6/perl/ppport.h:5691:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/nsca-ng-1.6/perl/ppport.h:5712:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
data/nsca-ng-1.6/perl/ppport.h:5734:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/nsca-ng-1.6/perl/ppport.h:5762:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/nsca-ng-1.6/perl/ppport.h:5783:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
data/nsca-ng-1.6/perl/ppport.h:5837:65:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#  define HvNAMELEN_get(hv)              (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0)
data/nsca-ng-1.6/perl/ppport.h:6829:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        STRLEN len = strlen(radix);
data/nsca-ng-1.6/perl/ppport.h:7413:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return strlen(buffer);
data/nsca-ng-1.6/perl/ppport.h:7453:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    used = strlen(dst);
data/nsca-ng-1.6/perl/ppport.h:7454:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    length = strlen(src);
data/nsca-ng-1.6/perl/ppport.h:7483:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    length = strlen(src);
data/nsca-ng-1.6/perl/uthash.h:91:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define uthash_strlen(s) strlen(s)
data/nsca-ng-1.6/python/client.c:60:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(identity, c->identity, max_identity_length);
data/nsca-ng-1.6/python/client.c:63:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy((char *)psk, c->psk, max_psk_length);
data/nsca-ng-1.6/python/client.c:66:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		return strlen((char *)psk);
data/nsca-ng-1.6/python/client.c:116:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	c->identity = malloc(strlen(identity) + 1);
data/nsca-ng-1.6/python/client.c:117:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	c->psk = malloc(strlen(psk) + 1);
data/nsca-ng-1.6/python/client.c:277:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(c->errstr, buf + 5, sizeof(c->errstr) - 1);
data/nsca-ng-1.6/python/client.c:285:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(c->errstr, buf + 5, sizeof(c->errstr) - 1);
data/nsca-ng-1.6/python/client.c:291:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(c->errstr, buf + 5, sizeof(c->errstr) - 1);
data/nsca-ng-1.6/python/client.c:300:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(c->errstr, buf, sizeof(c->errstr) - 1);
data/nsca-ng-1.6/python/client.c:388:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (!nscang_client_write(c, cmd, strlen(cmd), timeout))
data/nsca-ng-1.6/python/client.c:436:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(buf, "Can't create SSL context", buf_size);
data/nsca-ng-1.6/python/client.c:439:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(buf, "Bad ciphers list", buf_size);
data/nsca-ng-1.6/python/client.c:442:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(buf, "Can't create BIO socket", buf_size);
data/nsca-ng-1.6/python/client.c:445:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(buf, "Can't create SSL", buf_size);
data/nsca-ng-1.6/python/client.c:453:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(buf, "Can't allocate memory", buf_size);
data/nsca-ng-1.6/python/client.c:456:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(buf, "Timeout was reached", buf_size);
data/nsca-ng-1.6/python/client.c:459:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(buf, "Protocol mismatch - too long response", buf_size);
data/nsca-ng-1.6/python/client.c:466:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(buf, "Protocol mismatch - unexpected server response",
data/nsca-ng-1.6/python/client.c:470:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(buf, "Protocol mismatch - unknown server response",
data/nsca-ng-1.6/python/client.c:484:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(buf, "Can't obtain lock for instances list", buf_size);
data/nsca-ng-1.6/python/uthash.h:91:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define uthash_strlen(s) strlen(s)
data/nsca-ng-1.6/src/client/auth.c:51:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t identity_len = MIN(strlen(configured_id), max_identity_len - 1);
data/nsca-ng-1.6/src/client/auth.c:52:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t password_len = MIN(strlen(configured_pw), max_password_len);
data/nsca-ng-1.6/src/client/client.c:143:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	client->command_length = strlen(client->command);
data/nsca-ng-1.6/src/client/conf.c:199:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		for (c = cfg; c->key != NULL && (strlen(c->key) != len
data/nsca-ng-1.6/src/client/conf.c:284:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		(void)memset(value, 0, strlen(value));
data/nsca-ng-1.6/src/client/conf.c:285:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		(void)memset(line, 0, strlen(line));
data/nsca-ng-1.6/src/client/input.c:131:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if ((n = read(input->fd, input->input, sizeof(input->input)))
data/nsca-ng-1.6/src/client/parse.c:136:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t size = strlen(input) + 1;
data/nsca-ng-1.6/src/client/send_nsca.c:262:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	switch (strlen(sequence)) {
data/nsca-ng-1.6/src/client/send_nsca.c:351:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			(void)memset(password, 0, strlen(password));
data/nsca-ng-1.6/src/common/tls.c:329:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	write_buffered(tls, string, strlen(string));
data/nsca-ng-1.6/src/common/util.c:54:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len1 = strlen(str1);
data/nsca-ng-1.6/src/common/util.c:55:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len2 = strlen(str2);
data/nsca-ng-1.6/src/common/util.c:120:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((len = strlen(string)) > 0 && string[len - 1] == '\n')
data/nsca-ng-1.6/src/server/auth.c:77:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	password_len = MIN(strlen(configured_pw), max_password_len);
data/nsca-ng-1.6/src/server/fifo.c:417:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			fifo_write(fifo, command, strlen(command), free);
data/nsca-ng-1.6/src/server/fifo.c:479:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		fifo_write(fifo, command, strlen(command), free);
data/nsca-ng-1.6/src/server/nsca-ng.c:393:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				(void)memset(password, 0, strlen(password));
data/nsca-ng-1.6/tests/test_nsca.c:188:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len1 = strlen(part1);
data/nsca-ng-1.6/tests/test_nsca.c:196:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t len2 = strlen(part2);
data/nsca-ng-1.6/tests/test_nsca.c:201:9:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		(void)strcat(joined, " ");
data/nsca-ng-1.6/tests/test_nsca.c:256:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((c = getc(fifo)) != EOF) {

ANALYSIS SUMMARY:

Hits = 217
Lines analyzed = 27957 in approximately 0.72 seconds (38779 lines/second)
Physical Source Lines of Code (SLOC) = 17618
Hits@level = [0]  39 [1]  91 [2]  86 [3]  15 [4]  25 [5]   0
Hits@level+ = [0+] 256 [1+] 217 [2+] 126 [3+]  40 [4+]  25 [5+]   0
Hits/KSLOC@level+ = [0+] 14.5306 [1+] 12.3169 [2+] 7.15178 [3+] 2.27041 [4+] 1.419 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.