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/vbetool-1.1/x86-common.h Examining data/vbetool-1.1/x86-common.c Examining data/vbetool-1.1/vbetool.h Examining data/vbetool-1.1/include/regs.h Examining data/vbetool-1.1/include/types.h Examining data/vbetool-1.1/include/x86emu.h Examining data/vbetool-1.1/include/xf86x86emu.h Examining data/vbetool-1.1/include/lrmi.h Examining data/vbetool-1.1/include/xf86int10.h Examining data/vbetool-1.1/include/fpu_regs.h Examining data/vbetool-1.1/vbetool.c FINAL RESULTS: data/vbetool-1.1/include/regs.h:282: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 decode_buf[32]; /* encoded byte stream */ data/vbetool-1.1/include/regs.h:283: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 decoded_buf[256]; /* disassembled strings */ data/vbetool-1.1/vbetool.c:95:23: [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). return do_set_mode(atoi(argv[3]),0); data/vbetool-1.1/vbetool.c:103:23: [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). return do_set_mode(atoi(argv[3]),1); data/vbetool-1.1/vbetool.c:105:23: [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). return do_set_mode(atoi(argv[2]),1); data/vbetool-1.1/vbetool.c:118:16: [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). int romfd = open (argv[2], O_RDWR); data/vbetool-1.1/vbetool.c:141:35: [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). return do_set_panel_brightness(atoi(argv[3])); data/vbetool-1.1/vbetool.c:278: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 tmpbuffer[524288]; data/vbetool-1.1/vbetool.c:294:2: [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(data, tmpbuffer, length); data/vbetool-1.1/vbetool.c:518: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 reserved[14]; data/vbetool-1.1/x86-common.c:60:12: [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_zero = open("/dev/zero", O_RDWR); data/vbetool-1.1/x86-common.c:215:11: [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_mem = open("/dev/mem", O_RDWR); data/vbetool-1.1/vbetool.c:282:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((i = read(0, tmpbuffer + length, sizeof(tmpbuffer)-length))) { ANALYSIS SUMMARY: Hits = 13 Lines analyzed = 1993 in approximately 0.07 seconds (27976 lines/second) Physical Source Lines of Code (SLOC) = 1221 Hits@level = [0] 28 [1] 1 [2] 12 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 41 [1+] 13 [2+] 12 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 33.579 [1+] 10.647 [2+] 9.82801 [3+] 0 [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.