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/xwrited-3/xwd-application.c
Examining data/xwrited-3/xwd-application.h
Examining data/xwrited-3/xwd-utmp-utempter.c
Examining data/xwrited-3/xwd-utmp-utmpx.c
Examining data/xwrited-3/xwd-utmp.h
Examining data/xwrited-3/xwrited.c

FINAL RESULTS:

data/xwrited-3/xwd-application.c:110:4:  [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(oct, p + 1, 3);
data/xwrited-3/xwd-application.c:449: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).
	self->slavefd = open(slave_name, O_RDWR);
data/xwrited-3/xwd-utmp-utmpx.c:52: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).
		line += strlen(DEV_PREFIX);
data/xwrited-3/xwd-utmp-utmpx.c:55: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).
	line_len = strlen(line);
data/xwrited-3/xwd-utmp-utmpx.c:67:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(utmpx.ut_name, pwd->pw_name, sizeof (utmpx.ut_name));
data/xwrited-3/xwd-utmp-utmpx.c:68:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(utmpx.ut_id, id, sizeof (utmpx.ut_id));
data/xwrited-3/xwd-utmp-utmpx.c:69:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(utmpx.ut_line, line, sizeof (utmpx.ut_line));

ANALYSIS SUMMARY:

Hits = 7
Lines analyzed = 898 in approximately 0.04 seconds (21391 lines/second)
Physical Source Lines of Code (SLOC) = 561
Hits@level = [0]   0 [1]   5 [2]   2 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]   7 [1+]   7 [2+]   2 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 12.4777 [1+] 12.4777 [2+] 3.56506 [3+]   0 [4+]   0 [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.