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/wmtime-1.4/wmtime.c FINAL RESULTS: data/wmtime-1.4/wmtime.c:143:6: [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(color, argv[i+1]); data/wmtime-1.4/wmtime.c:175:6: [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(locale, argv[i+1]); data/wmtime-1.4/wmtime.c:301:42: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (asprintf(&conffile, "%s/.wmtimerc", getenv("HOME")) >= 0) { data/wmtime-1.4/wmtime.c:114:1: [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 day_of_week[7][3] = { "SU", "MO", "TU", "WE", "TH", "FR", "SA" }; data/wmtime-1.4/wmtime.c:115:1: [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 mon_of_year[12][4] = { "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" }; data/wmtime-1.4/wmtime.c:117:1: [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 color[256]; data/wmtime-1.4/wmtime.c:131: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 locale[256]; data/wmtime-1.4/wmtime.c:201: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 langbuf[10], outbuf[10]; data/wmtime-1.4/wmtime.c:477: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 time[TIME_SIZE]; data/wmtime-1.4/wmtime.c:513: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 date[DATE_SIZE]; data/wmtime-1.4/wmtime.c:214:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(langbuf, nl_langinfo(ABDAY_1 + i), 10); data/wmtime-1.4/wmtime.c:227:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(langbuf, nl_langinfo(ABMON_1 + i), 10); data/wmtime-1.4/wmtime.c:467:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(300000L); ANALYSIS SUMMARY: Hits = 13 Lines analyzed = 803 in approximately 0.05 seconds (16027 lines/second) Physical Source Lines of Code (SLOC) = 538 Hits@level = [0] 18 [1] 3 [2] 7 [3] 1 [4] 2 [5] 0 Hits@level+ = [0+] 31 [1+] 13 [2+] 10 [3+] 3 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 57.6208 [1+] 24.1636 [2+] 18.5874 [3+] 5.57621 [4+] 3.71747 [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.