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/bucklespring-1.4.0/buckle.h Examining data/bucklespring-1.4.0/main.c Examining data/bucklespring-1.4.0/rec.c Examining data/bucklespring-1.4.0/scan-mac.c Examining data/bucklespring-1.4.0/scan-windows.c Examining data/bucklespring-1.4.0/scan-linux.c FINAL RESULTS: data/bucklespring-1.4.0/main.c:30:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _msg "\n"); \ data/bucklespring-1.4.0/main.c:201:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buf, sizeof(buf), fmt, va); data/bucklespring-1.4.0/rec.c:37:6: [4] (shell) popen: 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. f = popen("parec --rate=44100 --format=s16le --channels=1", "r"); data/bucklespring-1.4.0/rec.c:66:12: [4] (shell) popen: 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. fout = popen(cmd, "w"); data/bucklespring-1.4.0/rec.c:92: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(cmd); data/bucklespring-1.4.0/main.c:72:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while( (c = getopt(argc, argv, "fhm:vd:g:lp:s:")) != EOF) { data/bucklespring-1.4.0/main.c:81:16: [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). opt_gain = atoi(optarg); data/bucklespring-1.4.0/main.c:99:24: [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). opt_stereo_width = atoi(optarg); data/bucklespring-1.4.0/main.c:197:3: [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 buf[256]; data/bucklespring-1.4.0/main.c:285:3: [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 fname[256]; data/bucklespring-1.4.0/rec.c:21: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 cmd[256]; data/bucklespring-1.4.0/rec.c:22: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 fname[256]; data/bucklespring-1.4.0/rec.c:40:10: [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_ev = open(argv[1], O_RDONLY); data/bucklespring-1.4.0/main.c:185:9: [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). len = strlen(device); data/bucklespring-1.4.0/rec.c:56:4: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd_ev, &event, sizeof event); data/bucklespring-1.4.0/rec.c:76:4: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd_snd, &buf, sizeof buf); ANALYSIS SUMMARY: Hits = 16 Lines analyzed = 849 in approximately 0.08 seconds (10447 lines/second) Physical Source Lines of Code (SLOC) = 635 Hits@level = [0] 23 [1] 3 [2] 7 [3] 1 [4] 5 [5] 0 Hits@level+ = [0+] 39 [1+] 16 [2+] 13 [3+] 6 [4+] 5 [5+] 0 Hits/KSLOC@level+ = [0+] 61.4173 [1+] 25.1969 [2+] 20.4724 [3+] 9.44882 [4+] 7.87402 [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.