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/systemd-cron-1.5.15/src/bin/crontab_setgid.c

FINAL RESULTS:

data/systemd-cron-1.5.15/src/bin/crontab_setgid.c:37: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 users[LOGIN_NAME_MAX];
data/systemd-cron-1.5.15/src/bin/crontab_setgid.c:38: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 crontab[sizeof CRONTAB_DIR + 1 + LOGIN_NAME_MAX];
data/systemd-cron-1.5.15/src/bin/crontab_setgid.c:39: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 temp[sizeof crontab + 7];
data/systemd-cron-1.5.15/src/bin/crontab_setgid.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 buffer[MAX_COMMAND];
data/systemd-cron-1.5.15/src/bin/crontab_setgid.c:48:11:  [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).
			file = fopen(crontab, "r");
data/systemd-cron-1.5.15/src/bin/crontab_setgid.c:60:11:  [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).
			file = fopen("/etc/cron.allow", "r");
data/systemd-cron-1.5.15/src/bin/crontab_setgid.c:73: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).
				file = fopen("/etc/cron.deny", "r");
data/systemd-cron-1.5.15/src/bin/crontab_setgid.c:89:13:  [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).
			int fd = mkstemp(temp);
data/systemd-cron-1.5.15/src/bin/crontab_setgid.c:23: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).
	int n=strlen(str);

ANALYSIS SUMMARY:

Hits = 9
Lines analyzed = 128 in approximately 0.02 seconds (5275 lines/second)
Physical Source Lines of Code (SLOC) = 116
Hits@level = [0]   6 [1]   1 [2]   8 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  15 [1+]   9 [2+]   8 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 129.31 [1+] 77.5862 [2+] 68.9655 [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.