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/booth-1.0-237-gdd88847/src/alt/logging_libqb.c
Examining data/booth-1.0-237-gdd88847/src/alt/logging_libqb.h
Examining data/booth-1.0-237-gdd88847/src/alt/nametag_libsystemd.c
Examining data/booth-1.0-237-gdd88847/src/alt/nametag_libsystemd.h
Examining data/booth-1.0-237-gdd88847/src/alt/range2random_glib.c
Examining data/booth-1.0-237-gdd88847/src/alt/range2random_glib.h
Examining data/booth-1.0-237-gdd88847/src/attr.c
Examining data/booth-1.0-237-gdd88847/src/attr.h
Examining data/booth-1.0-237-gdd88847/src/auth.c
Examining data/booth-1.0-237-gdd88847/src/auth.h
Examining data/booth-1.0-237-gdd88847/src/booth.h
Examining data/booth-1.0-237-gdd88847/src/config.c
Examining data/booth-1.0-237-gdd88847/src/config.h
Examining data/booth-1.0-237-gdd88847/src/handler.c
Examining data/booth-1.0-237-gdd88847/src/handler.h
Examining data/booth-1.0-237-gdd88847/src/inline-fn.h
Examining data/booth-1.0-237-gdd88847/src/log.h
Examining data/booth-1.0-237-gdd88847/src/main.c
Examining data/booth-1.0-237-gdd88847/src/manual.c
Examining data/booth-1.0-237-gdd88847/src/manual.h
Examining data/booth-1.0-237-gdd88847/src/pacemaker.c
Examining data/booth-1.0-237-gdd88847/src/pacemaker.h
Examining data/booth-1.0-237-gdd88847/src/raft.c
Examining data/booth-1.0-237-gdd88847/src/raft.h
Examining data/booth-1.0-237-gdd88847/src/request.c
Examining data/booth-1.0-237-gdd88847/src/request.h
Examining data/booth-1.0-237-gdd88847/src/ticket.c
Examining data/booth-1.0-237-gdd88847/src/ticket.h
Examining data/booth-1.0-237-gdd88847/src/timer.c
Examining data/booth-1.0-237-gdd88847/src/timer.h
Examining data/booth-1.0-237-gdd88847/src/transport.c
Examining data/booth-1.0-237-gdd88847/src/transport.h

FINAL RESULTS:

data/booth-1.0-237-gdd88847/src/alt/nametag_libsystemd.c:73:7:  [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.
	rv = vsnprintf(buffer, sizeof(buffer), suffix, ap);
data/booth-1.0-237-gdd88847/src/alt/nametag_libsystemd.h:20:65:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
sd_notify_wrapper(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
data/booth-1.0-237-gdd88847/src/config.c:266: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(tk->name, name);
data/booth-1.0-237-gdd88847/src/handler.c:43:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(expires, "%" PRId64, (int64_t)wall_ts(&tk->term_expires));
data/booth-1.0-237-gdd88847/src/handler.c:75:2:  [4] (shell) execv:
  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.
	execv(prog, tk_test.argv);
data/booth-1.0-237-gdd88847/src/handler.c:215:3:  [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(prog, tk_test.path);
data/booth-1.0-237-gdd88847/src/handler.c:217:3:  [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).
		strcat(prog, dp->d_name);
data/booth-1.0-237-gdd88847/src/main.c:1105:5:  [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(cl.configfile, BOOTH_DEFAULT_CONF_DIR);
data/booth-1.0-237-gdd88847/src/main.c:1120:6:  [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).
					strcat(cp, BOOTH_DEFAULT_CONF_EXT);
data/booth-1.0-237-gdd88847/src/main.c:1459:2:  [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).
	strcat(log_ent, type_to_string(local->type));
data/booth-1.0-237-gdd88847/src/pacemaker.c:71:7:  [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.
	rv = system("echo n | crm_ticket -g -t any-ticket-name > /dev/null 2> /dev/null");
data/booth-1.0-237-gdd88847/src/pacemaker.c:131:2:  [4] (format) snprintf:
  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.
	snprintf(cmd, COMMAND_MAX,
data/booth-1.0-237-gdd88847/src/pacemaker.c:145:7:  [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.
	rv = system(cmd);
data/booth-1.0-237-gdd88847/src/pacemaker.c:174:7:  [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.
	rv = system(cmd);
data/booth-1.0-237-gdd88847/src/pacemaker.c:199:7:  [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.
	rv = system(cmd);
data/booth-1.0-237-gdd88847/src/pacemaker.c:212:10:  [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.
			(rv = system(cmd));
data/booth-1.0-237-gdd88847/src/pacemaker.c:224:2:  [4] (format) snprintf:
  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.
	snprintf(cmd, COMMAND_MAX,
data/booth-1.0-237-gdd88847/src/pacemaker.c:363:6:  [4] (shell) popen:
  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.
	p = popen(cmd, "r");
data/booth-1.0-237-gdd88847/src/pacemaker.c:497:6:  [4] (shell) popen:
  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.
	p = popen(cmd, "r");
data/booth-1.0-237-gdd88847/src/alt/logging_libqb.c:42:16:  [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.
	inherit_env = getenv(ENV_HADEBUGVAL);
data/booth-1.0-237-gdd88847/src/alt/logging_libqb.c:46:16:  [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.
	inherit_env = getenv(ENV_LOGFENV);
data/booth-1.0-237-gdd88847/src/alt/logging_libqb.c:55:16:  [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.
	inherit_env = getenv(ENV_DEBUGFENV);
data/booth-1.0-237-gdd88847/src/alt/logging_libqb.c:61:16:  [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.
	inherit_env = getenv(ENV_LOGFACILITY);
data/booth-1.0-237-gdd88847/src/alt/logging_libqb.c:70:16:  [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.
	inherit_env = getenv(ENV_SYSLOGFMT);
data/booth-1.0-237-gdd88847/src/alt/range2random_glib.c:32:21:  [3] (random) g_random_int_range:
  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.
       return (int) g_random_int_range(from, to);
data/booth-1.0-237-gdd88847/src/main.c:1096:13:  [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.
		optchar = getopt(argc, argv, opt_string);
data/booth-1.0-237-gdd88847/src/alt/logging_libqb.c:43:29:  [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).
	if (inherit_env != NULL && atoi(inherit_env) != 0 )
data/booth-1.0-237-gdd88847/src/alt/logging_libqb.c:44: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).
		debug_level = atoi(inherit_env);
data/booth-1.0-237-gdd88847/src/alt/nametag_libsystemd.c:43: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 buffer[255];
data/booth-1.0-237-gdd88847/src/attr.c:183: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).
	rv = tpt->open(site);
data/booth-1.0-237-gdd88847/src/attr.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 time_str[64];
data/booth-1.0-237-gdd88847/src/auth.c:45:2:  [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(result, gcry_md_read(digest, 0), gcry_md_get_algo_dlen(hid));
data/booth-1.0-237-gdd88847/src/booth.h:81: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.
typedef char boothc_site[BOOTH_NAME_LEN];
data/booth-1.0-237-gdd88847/src/booth.h:82: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.
typedef char boothc_ticket[BOOTH_NAME_LEN];
data/booth-1.0-237-gdd88847/src/booth.h:83: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.
typedef char boothc_attr[BOOTH_NAME_LEN];
data/booth-1.0-237-gdd88847/src/booth.h:84: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.
typedef char boothc_attr_value[BOOTH_ATTRVAL_LEN];
data/booth-1.0-237-gdd88847/src/booth.h:131: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 data[0];
data/booth-1.0-237-gdd88847/src/booth.h:183: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 hash[BOOTH_MAC_SIZE];
data/booth-1.0-237-gdd88847/src/booth.h:361: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 configfile[BOOTH_PATH_LEN];
data/booth-1.0-237-gdd88847/src/booth.h:362: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 lockfile[BOOTH_PATH_LEN];
data/booth-1.0-237-gdd88847/src/booth.h:364: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 site[BOOTH_NAME_LEN];
data/booth-1.0-237-gdd88847/src/config.c:299:32:  [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 int parse_weights(const char *input, int weights[MAX_NODES])
data/booth-1.0-237-gdd88847/src/config.c:514: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 line[1024];
data/booth-1.0-237-gdd88847/src/config.c:527:7:  [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).
	fp = fopen(path, "r");
data/booth-1.0-237-gdd88847/src/config.c:554:2:  [2] (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). Risk is low because the source is a constant string.
	strcpy(booth_conf->site_user,  "hacluster");
data/booth-1.0-237-gdd88847/src/config.c:555:2:  [2] (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). Risk is low because the source is a constant string.
	strcpy(booth_conf->site_group, "haclient");
data/booth-1.0-237-gdd88847/src/config.c:556:2:  [2] (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). Risk is low because the source is a constant string.
	strcpy(booth_conf->arb_user,   "nobody");
data/booth-1.0-237-gdd88847/src/config.c:557:2:  [2] (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). Risk is low because the source is a constant string.
	strcpy(booth_conf->arb_group,  "nobody");
data/booth-1.0-237-gdd88847/src/config.c:680:23:  [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).
			booth_conf->port = atoi(val);
data/booth-1.0-237-gdd88847/src/config.c:700:30:  [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).
			booth_conf->maxtimeskew = atoi(val);
data/booth-1.0-237-gdd88847/src/config.c:740:36:  [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).
				debug_level = max(debug_level, atoi(val));
data/booth-1.0-237-gdd88847/src/config.h:107: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 *argv[MAX_ARGS];
data/booth-1.0-237-gdd88847/src/config.h:293: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 name[BOOTH_NAME_LEN];
data/booth-1.0-237-gdd88847/src/config.h:296: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 authfile[BOOTH_PATH_LEN];
data/booth-1.0-237-gdd88847/src/config.h:298: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 authkey[BOOTH_MAX_KEY_LEN];
data/booth-1.0-237-gdd88847/src/config.h:311: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 site_user[BOOTH_NAME_LEN];
data/booth-1.0-237-gdd88847/src/config.h:312: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 site_group[BOOTH_NAME_LEN];
data/booth-1.0-237-gdd88847/src/config.h:313: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 arb_user[BOOTH_NAME_LEN];
data/booth-1.0-237-gdd88847/src/config.h:314: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 arb_group[BOOTH_NAME_LEN];
data/booth-1.0-237-gdd88847/src/handler.c:41: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 expires[16];
data/booth-1.0-237-gdd88847/src/handler.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 prog[FILENAME_MAX+1];
data/booth-1.0-237-gdd88847/src/main.c:213: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 time_str[64];
data/booth-1.0-237-gdd88847/src/main.c:309: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(booth_conf->authfile, O_RDONLY);
data/booth-1.0-237-gdd88847/src/main.c:425: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 buffer[1024];
data/booth-1.0-237-gdd88847/src/main.c:675: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).
	rv = tpt->open(site);
data/booth-1.0-237-gdd88847/src/main.c:778: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).
	rv = tpt->open(site);
data/booth-1.0-237-gdd88847/src/main.c:852: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(cl.lockfile, mode, 0664);
data/booth-1.0-237-gdd88847/src/main.c:1016: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 site_arg[INET_ADDRSTRLEN] = {0};
data/booth-1.0-237-gdd88847/src/main.c:1283:13:  [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).
	FILE *fp = fopen(path, "w");
data/booth-1.0-237-gdd88847/src/main.c:1298: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 lockfile_data[1024], *cp;
data/booth-1.0-237-gdd88847/src/main.c:1424: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 log_ent[128] = DAEMON_NAME "-";
data/booth-1.0-237-gdd88847/src/pacemaker.c:109: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 text[64];
data/booth-1.0-237-gdd88847/src/pacemaker.c:115:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(text, "got signal %d", WTERMSIG(rv));
data/booth-1.0-237-gdd88847/src/pacemaker.c:117:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(text, "exit code %d", WEXITSTATUS(rv));
data/booth-1.0-237-gdd88847/src/pacemaker.c:125: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[COMMAND_MAX];
data/booth-1.0-237-gdd88847/src/pacemaker.c:158: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[COMMAND_MAX];
data/booth-1.0-237-gdd88847/src/pacemaker.c:183: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[COMMAND_MAX];
data/booth-1.0-237-gdd88847/src/pacemaker.c:222: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[COMMAND_MAX];
data/booth-1.0-237-gdd88847/src/pacemaker.c:232: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[COMMAND_MAX];
data/booth-1.0-237-gdd88847/src/pacemaker.c:242: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[COMMAND_MAX];
data/booth-1.0-237-gdd88847/src/pacemaker.c:282:20:  [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).
	secs2tv(unwall_ts(atol(val)), &tk->term_expires);
data/booth-1.0-237-gdd88847/src/pacemaker.c:289:21:  [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).
	tk->current_term = atol(val);
data/booth-1.0-237-gdd88847/src/pacemaker.c:302:7:  [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).
		v = atol(val);
data/booth-1.0-237-gdd88847/src/pacemaker.c:319:26:  [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).
	return !find_site_by_id(atol(val), &tk->leader);
data/booth-1.0-237-gdd88847/src/pacemaker.c:352: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[COMMAND_MAX];
data/booth-1.0-237-gdd88847/src/pacemaker.c:353: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 line[BOOTH_ATTRVAL_LEN+1];
data/booth-1.0-237-gdd88847/src/pacemaker.c:435: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 line[CHUNK_SIZE];
data/booth-1.0-237-gdd88847/src/pacemaker.c:485: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[COMMAND_MAX];
data/booth-1.0-237-gdd88847/src/ticket.c:180:2:  [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(tk->last_valid_tk, tk, sizeof(struct ticket_config));
data/booth-1.0-237-gdd88847/src/ticket.c:395: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 timeout_str[64];
data/booth-1.0-237-gdd88847/src/ticket.c:396: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 pending_str[64];
data/booth-1.0-237-gdd88847/src/ticket.c:428:4:  [2] (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). Risk is low because the source is a constant string.
			strcpy(timeout_str, "INF");
data/booth-1.0-237-gdd88847/src/ticket.c:433:4:  [2] (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). Risk is low because the source is a constant string.
			strcpy(pending_str, " (commit pending until ");
data/booth-1.0-237-gdd88847/src/ticket.c:547: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 buff[75];
data/booth-1.0-237-gdd88847/src/ticket.c:1381:30:  [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.
	union mu { cmd_request_t s; char c[5]; };
data/booth-1.0-237-gdd88847/src/transport.c:81: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.
static int find_address(unsigned char ipaddr[BOOTH_IPADDR_LEN],
data/booth-1.0-237-gdd88847/src/transport.c:150: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 ipaddr[BOOTH_IPADDR_LEN];
data/booth-1.0-237-gdd88847/src/transport.c:151: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 rcvbuf[NETLINK_BUFSIZE];
data/booth-1.0-237-gdd88847/src/transport.c:234:6:  [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(ipaddr, RTA_DATA(tb[IFA_LOCAL]),
data/booth-1.0-237-gdd88847/src/transport.c:237:6:  [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(ipaddr, RTA_DATA(tb[IFA_ADDRESS]),
data/booth-1.0-237-gdd88847/src/transport.c:810: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 buffer[MAX_MSG_LEN];
data/booth-1.0-237-gdd88847/src/transport.h:49:8:  [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).
	int (*open) (struct booth_site *);
data/booth-1.0-237-gdd88847/src/config.c:79:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(hostname, inet_ntoa(*addr_list[0]), BOOTH_NAME_LEN - 1);
data/booth-1.0-237-gdd88847/src/config.c:118:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(site->addr_string, addr_string, sizeof(site->addr_string) - 1);
data/booth-1.0-237-gdd88847/src/config.c:643: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).
				i = strlen(s);
data/booth-1.0-237-gdd88847/src/config.c:655:7:  [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 (strlen(key) > BOOTH_NAME_LEN
data/booth-1.0-237-gdd88847/src/config.c:656:8:  [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(val) > BOOTH_NAME_LEN) {
data/booth-1.0-237-gdd88847/src/config.c:857:15:  [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).
			cp2 = cp + strlen(cp);
data/booth-1.0-237-gdd88847/src/config.c:862:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(booth_conf->name, cp, cp2-cp);
data/booth-1.0-237-gdd88847/src/handler.c:210:7:  [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 (strlen(dp->d_name) + strlen(tk_test.path) + 1 > FILENAME_MAX) {
data/booth-1.0-237-gdd88847/src/handler.c:210: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).
		if (strlen(dp->d_name) + strlen(tk_test.path) + 1 > FILENAME_MAX) {
data/booth-1.0-237-gdd88847/src/handler.c:216:3:  [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.
		strcat(prog, "/");
data/booth-1.0-237-gdd88847/src/main.c:327:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	booth_conf->authkey_len = read(fd, booth_conf->authkey, BOOTH_MAX_KEY_LEN);
data/booth-1.0-237-gdd88847/src/main.c:767:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(cl.msg.ticket.id, booth_conf->ticket[0].name,
data/booth-1.0-237-gdd88847/src/main.c:844:5:  [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(BOOTH_RUN_DIR)) == 0)
data/booth-1.0-237-gdd88847/src/main.c:970:6:  [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 (strlen(value) >= content_len) {
data/booth-1.0-237-gdd88847/src/main.c:975:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(dest, value, content_len);
data/booth-1.0-237-gdd88847/src/main.c:1106: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).
				cp = cl.configfile + strlen(BOOTH_DEFAULT_CONF_DIR);
data/booth-1.0-237-gdd88847/src/main.c:1114:8:  [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(BOOTH_DEFAULT_CONF_EXT)),
data/booth-1.0-237-gdd88847/src/main.c:1332:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(status_lock_fd, lockfile_data, sizeof(lockfile_data) - 1);
data/booth-1.0-237-gdd88847/src/main.c:1544:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(cl.attr_msg.attr.tkt_id, booth_conf->ticket[0].name,
data/booth-1.0-237-gdd88847/src/main.c:1581:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cl.configfile,
data/booth-1.0-237-gdd88847/src/ticket.c:434: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).
			strftime(pending_str + strlen(" (commit pending until "),
data/booth-1.0-237-gdd88847/src/ticket.c:435: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).
					sizeof(pending_str) - strlen(" (commit pending until ") - 1,
data/booth-1.0-237-gdd88847/src/ticket.c:437:4:  [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.
			strcat(pending_str, ")");
data/booth-1.0-237-gdd88847/src/transport.c:340:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		rv = read(fd, (char *)buf + off, count - off);

ANALYSIS SUMMARY:

Hits = 126
Lines analyzed = 10090 in approximately 0.28 seconds (35462 lines/second)
Physical Source Lines of Code (SLOC) = 7093
Hits@level = [0]  41 [1]  24 [2]  76 [3]   7 [4]  19 [5]   0
Hits@level+ = [0+] 167 [1+] 126 [2+] 102 [3+]  26 [4+]  19 [5+]   0
Hits/KSLOC@level+ = [0+] 23.5443 [1+] 17.764 [2+] 14.3804 [3+] 3.66559 [4+] 2.6787 [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.