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/libpam-alreadyloggedin-0.3/pam_alreadyloggedin.c

FINAL RESULTS:

data/libpam-alreadyloggedin-0.3/pam_alreadyloggedin.c:86:2:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	syslog(LOG_DEBUG, "%s:%i " fmt , __FUNCTION__ , __LINE__ , ## args); \
data/libpam-alreadyloggedin-0.3/pam_alreadyloggedin.c:90:2:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	syslog(LOG_ERR, "%s:%i " fmt , __FUNCTION__ , __LINE__ , ## args)
data/libpam-alreadyloggedin-0.3/pam_alreadyloggedin.c:226:9:  [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(_PATH_UTMP, O_RDONLY);
data/libpam-alreadyloggedin-0.3/pam_alreadyloggedin.c:237: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 ttypath[sizeof(utmp->ut_line) + sizeof("/dev/")];
data/libpam-alreadyloggedin-0.3/pam_alreadyloggedin.c:123: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).
	int namelen = strlen(option_name);
data/libpam-alreadyloggedin-0.3/pam_alreadyloggedin.c:127: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).
		int arglen = strlen(arg);
data/libpam-alreadyloggedin-0.3/pam_alreadyloggedin.c:228:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(*fd, utmp, sizeof(*utmp)) == sizeof(*utmp))

ANALYSIS SUMMARY:

Hits = 7
Lines analyzed = 269 in approximately 0.10 seconds (2676 lines/second)
Physical Source Lines of Code (SLOC) = 166
Hits@level = [0]   1 [1]   3 [2]   2 [3]   0 [4]   2 [5]   0
Hits@level+ = [0+]   8 [1+]   7 [2+]   4 [3+]   2 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 48.1928 [1+] 42.1687 [2+] 24.0964 [3+] 12.0482 [4+] 12.0482 [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.