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/fstrm-0.6.0/fstrm/control.c
Examining data/fstrm-0.6.0/fstrm/control.h
Examining data/fstrm-0.6.0/fstrm/file.c
Examining data/fstrm-0.6.0/fstrm/file.h
Examining data/fstrm-0.6.0/fstrm/fstrm-private.h
Examining data/fstrm-0.6.0/fstrm/fstrm.h
Examining data/fstrm-0.6.0/fstrm/iothr.c
Examining data/fstrm-0.6.0/fstrm/iothr.h
Examining data/fstrm-0.6.0/fstrm/rdwr.c
Examining data/fstrm-0.6.0/fstrm/rdwr.h
Examining data/fstrm-0.6.0/fstrm/reader.c
Examining data/fstrm-0.6.0/fstrm/reader.h
Examining data/fstrm-0.6.0/fstrm/tcp_writer.c
Examining data/fstrm-0.6.0/fstrm/tcp_writer.h
Examining data/fstrm-0.6.0/fstrm/time.c
Examining data/fstrm-0.6.0/fstrm/unix_writer.c
Examining data/fstrm-0.6.0/fstrm/unix_writer.h
Examining data/fstrm-0.6.0/fstrm/writer.c
Examining data/fstrm-0.6.0/fstrm/writer.h
Examining data/fstrm-0.6.0/libmy/argv.c
Examining data/fstrm-0.6.0/libmy/argv.h
Examining data/fstrm-0.6.0/libmy/argv_loc.h
Examining data/fstrm-0.6.0/libmy/my_alloc.h
Examining data/fstrm-0.6.0/libmy/my_memory_barrier.h
Examining data/fstrm-0.6.0/libmy/my_queue.h
Examining data/fstrm-0.6.0/libmy/my_queue_mb.c
Examining data/fstrm-0.6.0/libmy/my_queue_mutex.c
Examining data/fstrm-0.6.0/libmy/my_time.h
Examining data/fstrm-0.6.0/libmy/print_string.h
Examining data/fstrm-0.6.0/libmy/read_bytes.h
Examining data/fstrm-0.6.0/libmy/ubuf.h
Examining data/fstrm-0.6.0/libmy/vector.h
Examining data/fstrm-0.6.0/src/fstrm_capture.c
Examining data/fstrm-0.6.0/src/fstrm_dump.c
Examining data/fstrm-0.6.0/src/fstrm_replay.c
Examining data/fstrm-0.6.0/t/test_control.c
Examining data/fstrm-0.6.0/t/test_file_hello.c
Examining data/fstrm-0.6.0/t/test_fstrm_io_file.c
Examining data/fstrm-0.6.0/t/test_fstrm_io_sock.c
Examining data/fstrm-0.6.0/t/test_queue.c
Examining data/fstrm-0.6.0/t/test_writer_hello.c

FINAL RESULTS:

data/fstrm-0.6.0/libmy/argv.c:37:33:  [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.
#define LOC_SNPRINTF(...)	(void)snprintf(__VA_ARGS__);
data/fstrm-0.6.0/libmy/ubuf.h:91:11:  [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.
	needed = vsnprintf(NULL, 0, fmt, args_copy);
data/fstrm-0.6.0/libmy/ubuf.h:96:11:  [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.
	status = vsnprintf((char *) ubuf_ptr(u), needed + 1, fmt, args);
data/fstrm-0.6.0/src/fstrm_capture.c:251:2:  [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.
	vfprintf(stderr, format, args);
data/fstrm-0.6.0/src/fstrm_capture.c:267:2:  [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.
	vfprintf(stderr, format, args);
data/fstrm-0.6.0/t/test_file_hello.c:51:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(buf, test_pattern, i);
data/fstrm-0.6.0/t/test_file_hello.c:69:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(buf, test_pattern, i);
data/fstrm-0.6.0/libmy/argv.c:2861:15:  [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.
  environ_p = getenv(env_name);
data/fstrm-0.6.0/libmy/argv.c:2910:13:  [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.
  env_val = getenv(GLOBAL_NAME);
data/fstrm-0.6.0/fstrm/control.c:172: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(ctype.data, content_type, ctype.len);
data/fstrm-0.6.0/fstrm/file.c:34: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	file_mode[2];
data/fstrm-0.6.0/fstrm/file.c:69:12:  [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).
			f->fp = fopen(f->file_path, f->file_mode);
data/fstrm-0.6.0/fstrm/fstrm-private.h:140: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).
	fstrm_rdwr_open_func		open;
data/fstrm-0.6.0/fstrm/rdwr.c:54:18:  [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).
	res = rdwr->ops.open(rdwr->obj);
data/fstrm-0.6.0/fstrm/writer.c:347: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(&w->iovecs[iov_idx], &iov[i], sizeof(struct iovec));
data/fstrm-0.6.0/libmy/argv.c:44:1:  [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_program[PROGRAM_NAME + 1] = "Unknown";
data/fstrm-0.6.0/libmy/argv.c:1306:28:  [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).
    *(short *)var = (short)atoi(arg);
data/fstrm-0.6.0/libmy/argv.c:1310:46:  [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).
    *(unsigned short *)var = (unsigned short)atoi(arg);
data/fstrm-0.6.0/libmy/argv.c:1314: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).
    *(int *)var = atoi(arg);
data/fstrm-0.6.0/libmy/argv.c:1318:28:  [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).
    *(unsigned int *)var = atoi(arg);
data/fstrm-0.6.0/libmy/argv.c:1322: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).
    *(long *)var = atol(arg);
data/fstrm-0.6.0/libmy/argv.c:1326:29:  [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).
    *(unsigned long *)var = atol(arg);
data/fstrm-0.6.0/libmy/argv.c:1355: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).
      *(int *)var = atoi(arg);
data/fstrm-0.6.0/libmy/argv.c:1365:13:  [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).
      val = atol(arg);
data/fstrm-0.6.0/libmy/argv.c:1393:28:  [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).
      val = (unsigned long)atol(arg);
data/fstrm-0.6.0/libmy/argv.c:1568:7:  [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	binary[2 + 128 + 1], *bin_bounds_p, *bin_p = binary;
data/fstrm-0.6.0/libmy/argv.c:1736: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[256];
data/fstrm-0.6.0/libmy/argv.c:2171: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	line[FILE_LINE_SIZE], *line_p;
data/fstrm-0.6.0/libmy/argv.c:2178:14:  [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).
    infile = fopen(path, "r");
data/fstrm-0.6.0/libmy/argv.c:2846: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	env_name[1024], *environ_p;
data/fstrm-0.6.0/libmy/argv.c:3600: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		details[128];
data/fstrm-0.6.0/libmy/argv.h:198:1:  [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_program[/* PROGRAM_NAME + 1 */];
data/fstrm-0.6.0/libmy/my_queue_mb.c:111: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(&q->data[head * q->sizeof_elem], item, q->sizeof_elem);
data/fstrm-0.6.0/libmy/my_queue_mb.c:131: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(item, &q->data[tail * q->sizeof_elem], q->sizeof_elem);
data/fstrm-0.6.0/libmy/my_queue_mutex.c:132: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(&q->data[head * q->sizeof_elem], item, q->sizeof_elem);
data/fstrm-0.6.0/libmy/my_queue_mutex.c:152: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(item, &q->data[tail * q->sizeof_elem], q->sizeof_elem);
data/fstrm-0.6.0/libmy/vector.h:107: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((vec)->_v + (vec)->_n, elems, (n_elems) * sizeof(type));	\
data/fstrm-0.6.0/src/fstrm_capture.c:568: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).
		int fd = open(fname, open_flags, open_mode);
data/fstrm-0.6.0/t/test_file_hello.c:49: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[100] = {0};
data/fstrm-0.6.0/t/test_file_hello.c:65: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[100] = {0};
data/fstrm-0.6.0/t/test_file_hello.c:102:7:  [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).
	rv = mkstemp(file_path);
data/fstrm-0.6.0/t/test_fstrm_io_file.c:180: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(file_path, O_RDONLY);
data/fstrm-0.6.0/t/test_fstrm_io_file.c:212:16:  [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).
	num_threads = atoi(argv[3]);
data/fstrm-0.6.0/t/test_fstrm_io_file.c:213: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).
	num_messages = atoi(argv[4]);
data/fstrm-0.6.0/t/test_fstrm_io_sock.c:420: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 s_tcp_socket_port[16] = {0};
data/fstrm-0.6.0/t/test_fstrm_io_sock.c:439:16:  [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).
	num_threads = atoi(argv[4]);
data/fstrm-0.6.0/t/test_fstrm_io_sock.c:440: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).
	num_messages = atoi(argv[5]);
data/fstrm-0.6.0/t/test_queue.c:300:9:  [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).
	size = atoi(argv[2]);
data/fstrm-0.6.0/t/test_queue.c:301:12:  [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).
	seconds = atoi(argv[3]);
data/fstrm-0.6.0/t/test_writer_hello.c:238: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[100];
data/fstrm-0.6.0/t/test_writer_hello.c:242: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(buf, "hello world #%d", i);
data/fstrm-0.6.0/fstrm/fstrm-private.h:142:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	fstrm_rdwr_read_func		read;
data/fstrm-0.6.0/fstrm/rdwr.c:89:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	res = rdwr->ops.read(rdwr->obj, data, count);
data/fstrm-0.6.0/fstrm/unix_writer.c:210: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(uwopt->socket_path) + 1 > sizeof(uw->sa.sun_path))
data/fstrm-0.6.0/fstrm/unix_writer.c:215:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(uw->sa.sun_path, uwopt->socket_path, sizeof(uw->sa.sun_path) - 1);
data/fstrm-0.6.0/fstrm/writer.c:275:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (w->rdwr->ops.read != NULL) {
data/fstrm-0.6.0/fstrm/writer.c:322:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (w->rdwr->ops.read != NULL) {
data/fstrm-0.6.0/libmy/argv.c:310: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(str);
data/fstrm-0.6.0/libmy/argv.c:542:33:  [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).
  col_c += USAGE_LABEL_LENGTH + strlen(argv_program);
data/fstrm-0.6.0/libmy/argv.c:637: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).
      var_len = strlen(arg_p->ar_var_label);
data/fstrm-0.6.0/libmy/argv.c:738: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).
    var_len = strlen(arg_p->ar_var_label);
data/fstrm-0.6.0/libmy/argv.c:908: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).
      col_c += LONG_PREFIX_LENGTH + MIN(len, (int)strlen(arg_p->ar_long_arg));
data/fstrm-0.6.0/libmy/argv.c:1500:7:  [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, "true (! 0)", buf_size);
data/fstrm-0.6.0/libmy/argv.c:1503:7:  [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, "false (0)", buf_size);
data/fstrm-0.6.0/libmy/argv.c:1506:11:  [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/fstrm-0.6.0/libmy/argv.c:1515:7:  [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, "(null)", buf_size);
data/fstrm-0.6.0/libmy/argv.c:1517: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).
      len = strlen(buf);
data/fstrm-0.6.0/libmy/argv.c:1526:11:  [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/fstrm-0.6.0/libmy/argv.c:1531:11:  [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/fstrm-0.6.0/libmy/argv.c:1536:11:  [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/fstrm-0.6.0/libmy/argv.c:1541:11:  [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/fstrm-0.6.0/libmy/argv.c:1546:11:  [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/fstrm-0.6.0/libmy/argv.c:1551:11:  [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/fstrm-0.6.0/libmy/argv.c:1556:11:  [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/fstrm-0.6.0/libmy/argv.c:1561:11:  [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/fstrm-0.6.0/libmy/argv.c:1571:2:  [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 character.
	strncpy(buf, "0", buf_size);
data/fstrm-0.6.0/libmy/argv.c:1603:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(buf, binary, buf_size);
data/fstrm-0.6.0/libmy/argv.c:1607: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).
      len = strlen(buf);
data/fstrm-0.6.0/libmy/argv.c:1613:13:  [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 character.
      (void)strncpy(buf, "0", buf_size);
data/fstrm-0.6.0/libmy/argv.c:1620:11:  [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/fstrm-0.6.0/libmy/argv.c:1625:13:  [1] (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 character.
      (void)strcpy(buf, "0");
data/fstrm-0.6.0/libmy/argv.c:1631:11:  [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/fstrm-0.6.0/libmy/argv.c:1636:11:  [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/fstrm-0.6.0/libmy/argv.c:1644:8:  [1] (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 character.
	(void)strcpy(buf, "0");
data/fstrm-0.6.0/libmy/argv.c:1662: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).
      len = strlen(buf);
data/fstrm-0.6.0/libmy/argv.c:1671:8:  [1] (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 character.
	(void)strcpy(buf, "0");
data/fstrm-0.6.0/libmy/argv.c:1689: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).
      len = strlen(buf);
data/fstrm-0.6.0/libmy/argv.c:1697:7:  [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, "true (! 0)", buf_size);
data/fstrm-0.6.0/libmy/argv.c:1700:7:  [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, "false (0)", buf_size);
data/fstrm-0.6.0/libmy/argv.c:1703:11:  [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/fstrm-0.6.0/libmy/argv.c:1707:5:  [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, "(unknown)", buf_size);
data/fstrm-0.6.0/libmy/argv.c:1709:11:  [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/fstrm-0.6.0/libmy/argv.c:1762: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).
					  (int)strlen(arg_p->ar_long_arg));
data/fstrm-0.6.0/libmy/argv.c:1787: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).
	tlen = strlen(type_p->at_name);
data/fstrm-0.6.0/libmy/argv.c:2481: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).
      len = strlen(*arg_p) - LONG_PREFIX_LENGTH;
data/fstrm-0.6.0/libmy/argv.c:2648: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).
	&& !(strlen(*arg_p) == 1)) {
data/fstrm-0.6.0/libmy/argv.c:2666: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).
      len = strlen(*arg_p) - SHORT_PREFIX_LENGTH;
data/fstrm-0.6.0/libmy/argv.c:2933:11:  [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(GLOBAL_CLOSE);
data/fstrm-0.6.0/libmy/argv.c:2958:11:  [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(GLOBAL_LASTTOG);
data/fstrm-0.6.0/libmy/argv.c:2983:11:  [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(GLOBAL_ENV);
data/fstrm-0.6.0/libmy/argv.c:3008:11:  [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(GLOBAL_ERROR);
data/fstrm-0.6.0/libmy/argv.c:3039:11:  [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(GLOBAL_MULTI);
data/fstrm-0.6.0/libmy/argv.c:3058:11:  [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(GLOBAL_USAGE);
data/fstrm-0.6.0/libmy/argv.c:3174:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  (void)strncpy(argv_program, prog_p, PROGRAM_NAME);
data/fstrm-0.6.0/libmy/argv.c:3612:7:  [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, "0 array entries", buf_size);
data/fstrm-0.6.0/libmy/argv.c:3614: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).
      ret = strlen(buf);
data/fstrm-0.6.0/libmy/argv.c:3626:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(buf + len, details, buf_size - len);
data/fstrm-0.6.0/libmy/argv.c:3628: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).
	ret = strlen(buf);
data/fstrm-0.6.0/libmy/read_bytes.h:15:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		bytes_read = read(fd, buf, bytes_needed);
data/fstrm-0.6.0/libmy/ubuf.h:48: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).
	size_t len = strlen(s);
data/fstrm-0.6.0/libmy/ubuf.h:59:38:  [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).
	ubuf_append(u, (const uint8_t *) s, strlen(s));
data/fstrm-0.6.0/src/fstrm_capture.c:367: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(ctx->args->str_read_unix) + 1 >
data/fstrm-0.6.0/src/fstrm_capture.c:374:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(sa->sun_path,
data/fstrm-0.6.0/src/fstrm_capture.c:481:3:  [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(ctx->args->str_content_type));
data/fstrm-0.6.0/src/fstrm_capture.c:530:34:  [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 size_t len_output_fname = strlen(ctx->args->str_write_fname) + 256;
data/fstrm-0.6.0/src/fstrm_capture.c:735:3:  [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(conn->ctx->args->str_content_type));
data/fstrm-0.6.0/src/fstrm_capture.c:809:3:  [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(conn->ctx->args->str_content_type));
data/fstrm-0.6.0/src/fstrm_replay.c:125: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).
	ctx->len_content_type = strlen(g_program_args.content_type);
data/fstrm-0.6.0/t/test_file_hello.c:52: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).
	res = fstrm_writer_write(w, buf, strlen(buf) + 1);
data/fstrm-0.6.0/t/test_file_hello.c:76: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).
	if (len_rbuf != strlen(buf) + 1) {
data/fstrm-0.6.0/t/test_file_hello.c:115: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).
		test_content_type, strlen(test_content_type));
data/fstrm-0.6.0/t/test_file_hello.c:162: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).
		test_content_type, strlen(test_content_type));
data/fstrm-0.6.0/t/test_fstrm_io_sock.c:338:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(sa.sun_path, socket_path, sizeof(sa.sun_path) - 1);
data/fstrm-0.6.0/t/test_writer_hello.c:212:11:  [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(test_content_type));
data/fstrm-0.6.0/t/test_writer_hello.c:246: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).
		h_cur->len = strlen(buf);
data/fstrm-0.6.0/t/test_writer_hello.c:252:48:  [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).
			res = fstrm_iothr_submit(iothr, ioq, bytes, strlen(bytes),

ANALYSIS SUMMARY:

Hits = 126
Lines analyzed = 15466 in approximately 0.41 seconds (37656 lines/second)
Physical Source Lines of Code (SLOC) = 8988
Hits@level = [0] 288 [1]  75 [2]  42 [3]   2 [4]   7 [5]   0
Hits@level+ = [0+] 414 [1+] 126 [2+]  51 [3+]   9 [4+]   7 [5+]   0
Hits/KSLOC@level+ = [0+] 46.0614 [1+] 14.0187 [2+] 5.67423 [3+] 1.00134 [4+] 0.778816 [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.