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/libutempter-1.1.6/iface.c Examining data/libutempter-1.1.6/utempter.h Examining data/libutempter-1.1.6/utempter.c FINAL RESULTS: data/libutempter-1.1.6/iface.c:63:2: [4] (shell) execv: 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. execv(path, argv); data/libutempter-1.1.6/iface.c:82:10: [4] (shell) execv: 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. (void) execv(path, argv); data/libutempter-1.1.6/utempter.c:51:40: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. static void __attribute__ ((__format__(printf,1,2))) data/libutempter-1.1.6/utempter.c:168:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ut.ut_name, user, sizeof(ut.ut_name)); data/libutempter-1.1.6/utempter.c:169:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ut.ut_line, term, sizeof(ut.ut_line)); data/libutempter-1.1.6/utempter.c:171:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ut.ut_host, host, sizeof(ut.ut_host)); data/libutempter-1.1.6/utempter.c:175:12: [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). offset = (strlen(term) <= sizeof(ut.ut_id)) ? 0 : data/libutempter-1.1.6/utempter.c:176:4: [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(term) - sizeof(ut.ut_id); data/libutempter-1.1.6/utempter.c:178:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ut.ut_id, term + offset, sizeof(ut.ut_id)); ANALYSIS SUMMARY: Hits = 9 Lines analyzed = 559 in approximately 0.02 seconds (24199 lines/second) Physical Source Lines of Code (SLOC) = 407 Hits@level = [0] 18 [1] 6 [2] 0 [3] 0 [4] 3 [5] 0 Hits@level+ = [0+] 27 [1+] 9 [2+] 3 [3+] 3 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 66.3391 [1+] 22.113 [2+] 7.37101 [3+] 7.37101 [4+] 7.37101 [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.