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/xphoon-20000613+0/moon.c Examining data/xphoon-20000613+0/tws.h Examining data/xphoon-20000613+0/vroot.h Examining data/xphoon-20000613+0/phase.c Examining data/xphoon-20000613+0/xphoon.c Examining data/xphoon-20000613+0/dtime.c FINAL RESULTS: data/xphoon-20000613+0/xphoon.c:164:5: [3] (random) srandom: 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. srandom( (int) ( clock ^ getpid() ) ); data/xphoon-20000613+0/xphoon.c:173:12: [3] (random) random: 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. seed = random(); data/xphoon-20000613+0/xphoon.c:442:12: [3] (random) random: 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. for ( j = random() % STARS_PER_TILE + STARS_PER_TILE / 2; j > 0; --j ) data/xphoon-20000613+0/xphoon.c:444:10: [3] (random) random: 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. r = random() % total_prob; data/xphoon-20000613+0/xphoon.c:450:11: [3] (random) random: 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. x = random() % ( TILE_SIZE - star_w[k] ); data/xphoon-20000613+0/xphoon.c:451:11: [3] (random) random: 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. y = random() % ( TILE_SIZE - star_h[k] ); data/xphoon-20000613+0/xphoon.c:681:5: [3] (random) srandom: 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. srandom( seed ); data/xphoon-20000613+0/xphoon.c:685:22: [3] (random) random: 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. display, star_tile[random() % NUM_TILES], root_pixmap, copygc, data/xphoon-20000613+0/xphoon.c:690:6: [3] (random) random: 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. x = random() % ( root_w - TILE_SIZE ); data/xphoon-20000613+0/xphoon.c:691:6: [3] (random) random: 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. y = random() % ( root_h - TILE_SIZE ); data/xphoon-20000613+0/xphoon.c:693:25: [3] (random) random: 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. display, star_tile[random() % NUM_TILES], root_pixmap, copygc, data/xphoon-20000613+0/xphoon.c:204:8: [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). tty = open( "/dev/tty", 0 ); data/xphoon-20000613+0/xphoon.c:238:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy( (char*) moon, (char*) mooncopy, size ); data/xphoon-20000613+0/xphoon.c:488:8: [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. static char leftmask[8] = { 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80 }; data/xphoon-20000613+0/xphoon.c:489:8: [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. static char rightmask[8] = { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f }; data/xphoon-20000613+0/xphoon.c:508: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 *shades[16] = { ANALYSIS SUMMARY: Hits = 16 Lines analyzed = 1498 in approximately 0.06 seconds (24685 lines/second) Physical Source Lines of Code (SLOC) = 1081 Hits@level = [0] 16 [1] 0 [2] 5 [3] 11 [4] 0 [5] 0 Hits@level+ = [0+] 32 [1+] 16 [2+] 16 [3+] 11 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 29.6022 [1+] 14.8011 [2+] 14.8011 [3+] 10.1758 [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.