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/acpi-support-0.143/debian/addons/fakekey/acpi_fakekey.c Examining data/acpi-support-0.143/debian/addons/fakekey/acpi_fakekeyd.c FINAL RESULTS: data/acpi-support-0.143/debian/addons/fakekey/acpi_fakekey.c:16: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). key = atoi(argv[1]); data/acpi-support-0.143/debian/addons/fakekey/acpi_fakekey.c:18: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). if ((fd = open(FIFO, O_WRONLY)) == -1) { data/acpi-support-0.143/debian/addons/fakekey/acpi_fakekeyd.c:33:15: [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). if ((fifo = open(FIFO, O_RDWR | O_NONBLOCK)) == -1) data/acpi-support-0.143/debian/addons/fakekey/acpi_fakekeyd.c:45:9: [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). udev = open("/dev/uinput", O_WRONLY | O_NDELAY); data/acpi-support-0.143/debian/addons/fakekey/acpi_fakekeyd.c:52:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(dev.name, "ACPI Virtual Keyboard Device", UINPUT_MAX_NAME_SIZE); data/acpi-support-0.143/debian/addons/fakekey/acpi_fakekeyd.c:94:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fifo, &key, 1); ANALYSIS SUMMARY: Hits = 6 Lines analyzed = 166 in approximately 0.02 seconds (8213 lines/second) Physical Source Lines of Code (SLOC) = 131 Hits@level = [0] 1 [1] 2 [2] 4 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 7 [1+] 6 [2+] 4 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 53.4351 [1+] 45.8015 [2+] 30.5344 [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.