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/2048-0.20191210.1117/2048.c FINAL RESULTS: data/2048-0.20191210.1117/2048.c:230:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/2048-0.20191210.1117/2048.c:42: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 color[40], reset[] = "\033[m"; data/2048-0.20191210.1117/2048.c:59:5: [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 s[8]; data/2048-0.20191210.1117/2048.c:61:19: [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). uint8_t t = 7-strlen(s); data/2048-0.20191210.1117/2048.c:382:5: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c=getchar(); data/2048-0.20191210.1117/2048.c:408:4: [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(150000); data/2048-0.20191210.1117/2048.c:418:6: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c=getchar(); data/2048-0.20191210.1117/2048.c:426:6: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c=getchar(); ANALYSIS SUMMARY: Hits = 8 Lines analyzed = 438 in approximately 0.02 seconds (22899 lines/second) Physical Source Lines of Code (SLOC) = 379 Hits@level = [0] 36 [1] 5 [2] 2 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 44 [1+] 8 [2+] 3 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 116.095 [1+] 21.1082 [2+] 7.91557 [3+] 2.63852 [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.