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/rovclock-0.6e/pci.h Examining data/rovclock-0.6e/radeon.h Examining data/rovclock-0.6e/rovclock.c FINAL RESULTS: data/rovclock-0.6e/rovclock.c:460:16: [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 ((opt = getopt(argc, argv, "ic:m:x:t:")) > 0) { data/rovclock-0.6e/rovclock.c:233:8: [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). val = atoi(vp); data/rovclock-0.6e/rovclock.c:289:14: [2] (misc) fopen: 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). if ((proc = fopen("/proc/bus/pci/devices", "r")) != NULL) { data/rovclock-0.6e/rovclock.c:366:13: [2] (misc) fopen: 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). if ((mem = fopen("/dev/mem", "r")) == NULL) { data/rovclock-0.6e/rovclock.c:399:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&rovclock->pll, (rom + pll_info_start), sizeof(struct pll_block)); data/rovclock-0.6e/rovclock.c:465:30: [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). case 'x': rovclock.xtal = atoi(optarg); data/rovclock-0.6e/rovclock.c:471:31: [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). case 'c': rovclock.cfreq = atoi(optarg); data/rovclock-0.6e/rovclock.c:478:31: [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). case 'm': rovclock.mfreq = atoi(optarg); data/rovclock-0.6e/rovclock.c:236:56: [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). if (!strncmp(mem_timings[count].description, string, strlen(string))) { data/rovclock-0.6e/rovclock.c:303:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((temp = fgetc(proc)) != EOF) ANALYSIS SUMMARY: Hits = 10 Lines analyzed = 2893 in approximately 0.08 seconds (34547 lines/second) Physical Source Lines of Code (SLOC) = 2471 Hits@level = [0] 29 [1] 2 [2] 7 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 39 [1+] 10 [2+] 8 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 15.7831 [1+] 4.04694 [2+] 3.23756 [3+] 0.404694 [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.