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/ascdc-0.3/ascdc.c FINAL RESULTS: data/ascdc-0.3/ascdc.c:164:7: [4] (shell) system: 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. system(cdplayer); data/ascdc-0.3/ascdc.c:332:5: [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(&device[0], argv[i]); data/ascdc-0.3/ascdc.c:337:5: [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(mountdir, argv[i]); data/ascdc-0.3/ascdc.c:342:5: [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(cdplayer, argv[i]); data/ascdc-0.3/ascdc.c:79: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 device[128]=DEFAULTDEVICE; data/ascdc-0.3/ascdc.c:81: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 cdplayer[128]="/usr/X11R6/bin/xmcd"; data/ascdc-0.3/ascdc.c:84: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 mountdir[128]=""; data/ascdc-0.3/ascdc.c:121:14: [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). fd = open (device, 0); data/ascdc-0.3/ascdc.c:343:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(cdplayer, " &"); data/ascdc-0.3/ascdc.c:349:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). swapcd(atoi(argv[i])); data/ascdc-0.3/ascdc.c:405: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(5000L); ANALYSIS SUMMARY: Hits = 11 Lines analyzed = 486 in approximately 0.02 seconds (22853 lines/second) Physical Source Lines of Code (SLOC) = 350 Hits@level = [0] 26 [1] 1 [2] 6 [3] 0 [4] 4 [5] 0 Hits@level+ = [0+] 37 [1+] 11 [2+] 10 [3+] 4 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 105.714 [1+] 31.4286 [2+] 28.5714 [3+] 11.4286 [4+] 11.4286 [5+] 0 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.