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/xdu-3.0/patchlevel.h
Examining data/xdu-3.0/version.h
Examining data/xdu-3.0/xwin.c
Examining data/xdu-3.0/xdu.c

FINAL RESULTS:

data/xdu-3.0/xdu.c:211:4:  [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(stderr, usage);
data/xdu-3.0/xdu.c:219: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(stderr, usage);
data/xdu-3.0/xdu.c:643: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(path,stack[num]->name);
data/xdu-3.0/xdu.c:661: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(cp,s);
data/xdu-3.0/xwin.c:400:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(label,"%s (%lli)", name, size);
data/xdu-3.0/xdu.c:241: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[4096];
data/xdu-3.0/xdu.c:249: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).
		if ((fp = fopen(filename, "r")) == 0) {
data/xdu-3.0/xdu.c:277: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	*path[MAXDEPTH]; /* break up path into this list */
data/xdu-3.0/xdu.c:278: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[MAXNAME];	 /* temp space for path element name */
data/xdu-3.0/xdu.c:627: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 path[MAXPATH];
data/xdu-3.0/xwin.c:225:6:  [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).
	n = atoi(*params);
data/xdu-3.0/xwin.c:391: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	label[1024];
data/xdu-3.0/xdu.c:285: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).
	length = strlen(name);
data/xdu-3.0/xdu.c:645: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(path,"/");
data/xdu-3.0/xdu.c:659: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).
	n = strlen(s);
data/xdu-3.0/xwin.c:404: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).
	XTextExtents(res.font, name, strlen(name), &direction,
data/xdu-3.0/xwin.c:413: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).
	XDrawString(dpy, win, gc, textx, texty, name, strlen(name));

ANALYSIS SUMMARY:

Hits = 17
Lines analyzed = 1302 in approximately 0.04 seconds (34958 lines/second)
Physical Source Lines of Code (SLOC) = 917
Hits@level = [0]  12 [1]   5 [2]   7 [3]   0 [4]   5 [5]   0
Hits@level+ = [0+]  29 [1+]  17 [2+]  12 [3+]   5 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 31.6249 [1+] 18.5387 [2+] 13.0862 [3+] 5.45256 [4+] 5.45256 [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.