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/rdup-1.1.15/abspath.c
Examining data/rdup-1.1.15/base64.c
Examining data/rdup-1.1.15/base64.h
Examining data/rdup-1.1.15/child.c
Examining data/rdup-1.1.15/chown.c
Examining data/rdup-1.1.15/common.c
Examining data/rdup-1.1.15/common.h
Examining data/rdup-1.1.15/crawler.c
Examining data/rdup-1.1.15/crypt.c
Examining data/rdup-1.1.15/dir.c
Examining data/rdup-1.1.15/entry.c
Examining data/rdup-1.1.15/entry.h
Examining data/rdup-1.1.15/fs-up.c
Examining data/rdup-1.1.15/getdelim.c
Examining data/rdup-1.1.15/gfunc.c
Examining data/rdup-1.1.15/io.h
Examining data/rdup-1.1.15/link.c
Examining data/rdup-1.1.15/mkpath.c
Examining data/rdup-1.1.15/msg.c
Examining data/rdup-1.1.15/names.c
Examining data/rdup-1.1.15/protocol.h
Examining data/rdup-1.1.15/rdup-tr.c
Examining data/rdup-1.1.15/rdup-up.c
Examining data/rdup-1.1.15/regexp.c
Examining data/rdup-1.1.15/reverse.c
Examining data/rdup-1.1.15/rm.c
Examining data/rdup-1.1.15/sha1.c
Examining data/rdup-1.1.15/signal.c
Examining data/rdup-1.1.15/strippath.c
Examining data/rdup-1.1.15/usage-tr.c
Examining data/rdup-1.1.15/usage-up.c
Examining data/rdup-1.1.15/usage.c
Examining data/rdup-1.1.15/xattr.c
Examining data/rdup-1.1.15/protocol.c
Examining data/rdup-1.1.15/rdup.c

FINAL RESULTS:

data/rdup-1.1.15/dir.c:25:6:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	if (chmod(p, s->st_mode | S_IWUSR) == -1) {
data/rdup-1.1.15/dir.c:38:6:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	if (chmod(p, s->st_mode & 07777) == -1) {
data/rdup-1.1.15/fs-up.c:74:2:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	chmod(e->f_name, e->f_mode);
data/rdup-1.1.15/link.c:35:11:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	if ((i = readlink(e->f_name, buf, BUFSIZE)) == -1) {
data/rdup-1.1.15/rm.c:115:4:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
			chmod(p, st.st_mode | S_IWUSR);
data/rdup-1.1.15/rm.c:120:5:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
				chmod(p, st.st_mode);	/* is this usefull then? */
data/rdup-1.1.15/child.c:144:8:  [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.
			if (execvp(args[0], args) == -1) {
data/rdup-1.1.15/crawler.c:115:7:  [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(path, R_OK) == 0) {
data/rdup-1.1.15/crypt.c:26:50:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
struct aes_ctx *crypt_init(gchar * key, gboolean crypt)
data/rdup-1.1.15/crypt.c:30:6:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (crypt)
data/rdup-1.1.15/crypt.c:119:9:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	gchar *crypt, *hashed;
data/rdup-1.1.15/crypt.c:129:40:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	crypt_size = decode_base64((guchar *) crypt, b64);
data/rdup-1.1.15/crypt.c:139:20:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	g_memmove(source, crypt, crypt_size);
data/rdup-1.1.15/crypt.c:143:9:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	g_free(crypt);
data/rdup-1.1.15/crypt.c:165:21:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	gchar *q, *c, *t, *crypt, *xpath, *temp, d;
data/rdup-1.1.15/crypt.c:186:43:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
			temp = g_strdup_printf("%s/%s", xpath, crypt);
data/rdup-1.1.15/crypt.c:192:36:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
				xpath = g_strdup_printf("/%s", crypt);
data/rdup-1.1.15/crypt.c:195:22:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
				xpath = g_strdup(crypt);
data/rdup-1.1.15/crypt.c:205:42:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
		temp = g_strdup_printf("%s/%s", xpath, crypt);
data/rdup-1.1.15/crypt.c:211:35:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
			xpath = g_strdup_printf("/%s", crypt);
data/rdup-1.1.15/crypt.c:214:21:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
			xpath = g_strdup(crypt);
data/rdup-1.1.15/gfunc.c:307:3:  [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.
		fprintf(out, NO_SHA);
data/rdup-1.1.15/gfunc.c:360:7:  [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(e->f_name, R_OK) == -1) {
data/rdup-1.1.15/msg.c:12: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, fmt, args);
data/rdup-1.1.15/msg.c:26: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, fmt, args);
data/rdup-1.1.15/rdup-tr.c:45:9:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	gchar *crypt, *dest;
data/rdup-1.1.15/rdup-tr.c:51:14:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	e->f_name = crypt;
data/rdup-1.1.15/rdup-tr.c:52:26:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	e->f_name_size = strlen(crypt);
data/rdup-1.1.15/rdup-tr.c:58:22:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
		e->f_size = strlen(crypt);	/* use crypt here */
data/rdup-1.1.15/rdup-tr.c:163:17:  [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.
	char *tmpenv = getenv("TMPDIR");
data/rdup-1.1.15/rdup-tr.c:434:14:  [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 ((c = getopt(argc, argv, "cP:O:t:LhVvX:Y:")) != -1) {
data/rdup-1.1.15/rdup-up.c:177:14:  [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 ((c = getopt(argc, argv, "thnVvus:r:Tq")) != -1) {
data/rdup-1.1.15/rdup.c:308:14:  [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 ((c = getopt(argc, argv, "acrlmhVRnud:N:M:P:s:vqxF:E:")) != -1) {
data/rdup-1.1.15/child.c:70: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[4];
data/rdup-1.1.15/chown.c:25: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).
	if (!(f = fopen(path, "w"))) {
data/rdup-1.1.15/chown.c:46: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).
	if (!(f = fopen(path, "r"))) {
data/rdup-1.1.15/crypt.c:296: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).
	if (!(f = fopen(file, "r"))) {
data/rdup-1.1.15/entry.c:163: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).
		e->f_mtime = (time_t) atol(buf + 8);
data/rdup-1.1.15/entry.c:175: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).
		e->f_uid = atoi(pos);
data/rdup-1.1.15/entry.c:199: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).
		e->f_gid = atoi(pos);
data/rdup-1.1.15/entry.c:222:20:  [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).
		e->f_name_size = atoi(pos);	/* checks */
data/rdup-1.1.15/entry.c:235: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).
			major = atoi(pos);
data/rdup-1.1.15/entry.c:236: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).
			minor = atoi(n + 1);
data/rdup-1.1.15/entry.c:240: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).
			e->f_size = atoi(pos);
data/rdup-1.1.15/fs-up.c:238:26:  [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 (!opt_dry && !(out = fopen(e->f_name, "w"))) {
data/rdup-1.1.15/fs-up.c:242:16:  [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 (!(out = fopen(e->f_name, "w"))) {
data/rdup-1.1.15/gfunc.c:38: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 digest[SHA1_DIGEST_SIZE];
data/rdup-1.1.15/gfunc.c:42: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).
	if ((file = fopen(filename, "r")) == NULL) {
data/rdup-1.1.15/gfunc.c: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 buf[BUFSIZE + 1];
data/rdup-1.1.15/gfunc.c:73: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).
	if ((file = fopen(filename, "r")) == NULL) {
data/rdup-1.1.15/link.c:32: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[BUFSIZE + 1];
data/rdup-1.1.15/protocol.c:106: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 c[6];
data/rdup-1.1.15/protocol.c:177:10:  [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).
	bytes = atoi(out);
data/rdup-1.1.15/rdup-tr.c:172:12:  [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).
			tmpfd = mkstemp(tmpname);
data/rdup-1.1.15/rdup-tr.c:399: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 pwd[BUFSIZE + 1];
data/rdup-1.1.15/rdup-up.c:139: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 pwd[BUFSIZE + 1];
data/rdup-1.1.15/rdup-up.c:197:20:  [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_strip = abs(atoi(optarg));
data/rdup-1.1.15/rdup.c:103:20:  [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).
		modus = (mode_t) atoi(buf);
data/rdup-1.1.15/rdup.c:115: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).
		f_dev = (dev_t) atoi(q);
data/rdup-1.1.15/rdup.c:161:26:  [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).
		f_name_size = (size_t) atoi(q);
data/rdup-1.1.15/rdup.c:255: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 pwd[BUFSIZE + 1];
data/rdup-1.1.15/rdup.c:379:15:  [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_size = atoi(optarg);
data/rdup-1.1.15/rdup.c:414:17:  [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 (!(fplist = fopen(argv[0], "r"))) {
data/rdup-1.1.15/rdup.c:481:18:  [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 (!(fplist = fopen(argv[0], "w"))) {
data/rdup-1.1.15/regexp.c:31: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).
	if ((fp = fopen(file, "r")) == NULL) {
data/rdup-1.1.15/regexp.c:59: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.
			d = memcpy(d, P, re_length);
data/rdup-1.1.15/xattr.c:23: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[ATTR_SIZE + 1];
data/rdup-1.1.15/xattr.c:28:15:  [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).
		x = (uid_t) atoi(buf);
data/rdup-1.1.15/xattr.c:44: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[ATTR_SIZE + 1];
data/rdup-1.1.15/xattr.c:59: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).
	x = (uid_t) atoi(buf);
data/rdup-1.1.15/xattr.c:75: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[ATTR_SIZE + 1];
data/rdup-1.1.15/xattr.c:81:15:  [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).
		x = (gid_t) atoi(buf);
data/rdup-1.1.15/xattr.c:96: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[ATTR_SIZE + 1];
data/rdup-1.1.15/xattr.c:111: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).
	x = (uid_t) atoi(buf);
data/rdup-1.1.15/abspath.c:34: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).
	i = strlen(abspath2);
data/rdup-1.1.15/base64.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).
		size = strlen((char *)src);
data/rdup-1.1.15/base64.c:108: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).
		int k, l = strlen(src) + 1;
data/rdup-1.1.15/crawler.c:33: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).
	len = strlen(path);
data/rdup-1.1.15/crawler.c:52:19:  [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).
		e.f_name_size = strlen(path2);
data/rdup-1.1.15/crawler.c:71: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).
			e.f_name_size += 4 + strlen(e.f_target);
data/rdup-1.1.15/crawler.c:152: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).
			curpath_len = strlen(curpath);
data/rdup-1.1.15/crawler.c:155: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).
			curpath_len = strlen(curpath);
data/rdup-1.1.15/crawler.c:211: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).
				pop.f_name_size += 4 + strlen(pop.f_target);
data/rdup-1.1.15/crawler.c:230: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).
				rp.len = strlen(path);
data/rdup-1.1.15/crypt.c:28: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).
	guint length = strlen(key);
data/rdup-1.1.15/crypt.c:80: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).
	len = strlen(elem);
data/rdup-1.1.15/crypt.c:100: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).
	} else if (strlen(b64) > 255) {
data/rdup-1.1.15/crypt.c:122: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).
	len = strlen(b64);
data/rdup-1.1.15/crypt.c:309: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).
	if (buf[strlen(buf) - 1] == '\n') {
data/rdup-1.1.15/crypt.c:310: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).
		buf[strlen(buf) - 1] = '\0';	/* kill \n */
data/rdup-1.1.15/crypt.c:312: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).
	s = strlen(buf);
data/rdup-1.1.15/entry.c:56:20:  [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).
		e->f_name_size = strlen(buf);
data/rdup-1.1.15/entry.c:78: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(buf) < LIST_MINSIZE) {
data/rdup-1.1.15/entry.c:292:20:  [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).
		e->f_name_size = strlen(n);
data/rdup-1.1.15/entry.c:322:20:  [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 (write(1, out, strlen(out)) == -1) {
data/rdup-1.1.15/getdelim.c:28:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((c = fgetc(stream)) != EOF) {
data/rdup-1.1.15/gfunc.c:114:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		i = read(parent[0], buf, BUFSIZE);
data/rdup-1.1.15/gfunc.c:139:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			i = read(parent[0], buf, BUFSIZE);
data/rdup-1.1.15/gfunc.c:246: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(e->f_target));
data/rdup-1.1.15/gfunc.c:249:20:  [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).
				(unsigned long)strlen(e->f_target));
data/rdup-1.1.15/protocol.c:52: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).
		if (fwrite(p, sizeof(char), strlen(p), f) != strlen(p))
data/rdup-1.1.15/protocol.c:52: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).
		if (fwrite(p, sizeof(char), strlen(p), f) != strlen(p))
data/rdup-1.1.15/protocol.c:56:20:  [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 (write(fp, p, strlen(p)) == -1)
data/rdup-1.1.15/protocol.c:112:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c[0] = fgetc(f);
data/rdup-1.1.15/protocol.c:115:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c[1] = fgetc(f);
data/rdup-1.1.15/protocol.c:126:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c[0] = fgetc(f);	/* B */
data/rdup-1.1.15/protocol.c:129:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c[1] = fgetc(f);	/* L */
data/rdup-1.1.15/protocol.c:132:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c[2] = fgetc(f);	/* O */
data/rdup-1.1.15/protocol.c:135:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c[3] = fgetc(f);	/* C */
data/rdup-1.1.15/protocol.c:138:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c[4] = fgetc(f);	/* K */
data/rdup-1.1.15/protocol.c:150:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c[0] = fgetc(f);
data/rdup-1.1.15/protocol.c:153:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c[1] = fgetc(f);
data/rdup-1.1.15/protocol.c:156:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c[2] = fgetc(f);
data/rdup-1.1.15/protocol.c:159:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c[3] = fgetc(f);
data/rdup-1.1.15/protocol.c:162:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c[4] = fgetc(f);
data/rdup-1.1.15/protocol.c:165:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c[5] = fgetc(f);	/* \n */
data/rdup-1.1.15/rdup-tr.c:52:19:  [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).
	e->f_name_size = strlen(crypt);
data/rdup-1.1.15/rdup-tr.c:58: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).
		e->f_size = strlen(crypt);	/* use crypt here */
data/rdup-1.1.15/rdup-tr.c:74:19:  [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).
	e->f_name_size = strlen(plain);
data/rdup-1.1.15/rdup-tr.c:81: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).
		e->f_size = strlen(plain);
data/rdup-1.1.15/rdup-tr.c:223: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).
			rdup_entry->f_name_size = strlen(rdup_entry->f_name);
data/rdup-1.1.15/rdup-tr.c:347:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			k = read(tmpfd, fbuf, BUFSIZE);
data/rdup-1.1.15/rdup-tr.c:350:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				k = read(tmpfd, fbuf, BUFSIZE);
data/rdup-1.1.15/rdup-tr.c:428: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(argv[c]) > BUFSIZE) {
data/rdup-1.1.15/rdup-up.c:51: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).
		pathlen = strlen(path);
data/rdup-1.1.15/rdup-up.c:171: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(argv[c]) > BUFSIZE) {
data/rdup-1.1.15/rdup-up.c:213: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).
			if (opt_path_strip[strlen(opt_path_strip) - 1] != '/')
data/rdup-1.1.15/rdup-up.c:218:20:  [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 (i = 0; i < strlen(opt_path_strip); i++) {
data/rdup-1.1.15/rdup.c:175: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).
		str_len = strlen(p + 1);
data/rdup-1.1.15/rdup.c:194: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).
			e->f_name_size = strlen(e->f_name);
data/rdup-1.1.15/rdup.c:196: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).
			e->f_size = strlen(e->f_name);
data/rdup-1.1.15/rdup.c:300: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(argv[c]) > BUFSIZE) {
data/rdup-1.1.15/strippath.c:60:19:  [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).
	e->f_name_size = strlen(p);
data/rdup-1.1.15/strippath.c:69: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).
		e->f_size = strlen(e->f_target);
data/rdup-1.1.15/strippath.c:103: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).
	len = strlen(opt_path_strip) - 1;	/* -1: discard the trailing slash */
data/rdup-1.1.15/strippath.c:121:32:  [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).
			memmove(e->f_target, where, strlen(e->f_target) - len);
data/rdup-1.1.15/xattr.c:54:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ((r = read(attfd, buf, ATTR_SIZE)) == -1) {
data/rdup-1.1.15/xattr.c:106:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ((r = read(attfd, buf, ATTR_SIZE)) == -1) {

ANALYSIS SUMMARY:

Hits = 138
Lines analyzed = 5484 in approximately 0.16 seconds (33368 lines/second)
Physical Source Lines of Code (SLOC) = 4037
Hits@level = [0]  54 [1]  64 [2]  41 [3]   4 [4]  23 [5]   6
Hits@level+ = [0+] 192 [1+] 138 [2+]  74 [3+]  33 [4+]  29 [5+]   6
Hits/KSLOC@level+ = [0+] 47.5601 [1+] 34.1838 [2+] 18.3304 [3+] 8.17439 [4+] 7.18355 [5+] 1.48625
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.