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/projecteur-0.8/icons/icon-font/templates/projecteur-icons-def.h Examining data/projecteur-0.8/src/aboutdlg.cc Examining data/projecteur-0.8/src/aboutdlg.h Examining data/projecteur-0.8/src/actiondelegate.cc Examining data/projecteur-0.8/src/actiondelegate.h Examining data/projecteur-0.8/src/colorselector.cc Examining data/projecteur-0.8/src/colorselector.h Examining data/projecteur-0.8/src/device.cc Examining data/projecteur-0.8/src/device.h Examining data/projecteur-0.8/src/deviceinput.cc Examining data/projecteur-0.8/src/deviceinput.h Examining data/projecteur-0.8/src/devicescan.cc Examining data/projecteur-0.8/src/devicescan.h Examining data/projecteur-0.8/src/deviceswidget.cc Examining data/projecteur-0.8/src/deviceswidget.h Examining data/projecteur-0.8/src/enum-helper.h Examining data/projecteur-0.8/src/iconwidgets.cc Examining data/projecteur-0.8/src/iconwidgets.h Examining data/projecteur-0.8/src/imageitem.cc Examining data/projecteur-0.8/src/imageitem.h Examining data/projecteur-0.8/src/inputmapconfig.cc Examining data/projecteur-0.8/src/inputmapconfig.h Examining data/projecteur-0.8/src/inputseqedit.cc Parsing failed to find end of parameter list; semicolon terminated it in (first.cbegin(), first.cend(), second.cbegin(), second.cend(), [](const DeviceInputEvent& e1, const DeviceInputEvent& e2) { if (e1.type != EV_KEY) return e1 == e2; // just compare Examining data/projecteur-0.8/src/inputseqedit.h Examining data/projecteur-0.8/src/linuxdesktop.cc Examining data/projecteur-0.8/src/linuxdesktop.h Examining data/projecteur-0.8/src/logging.cc Examining data/projecteur-0.8/src/logging.h Examining data/projecteur-0.8/src/main.cc Examining data/projecteur-0.8/src/nativekeyseqedit.cc Examining data/projecteur-0.8/src/nativekeyseqedit.h Examining data/projecteur-0.8/src/preferencesdlg.cc Examining data/projecteur-0.8/src/preferencesdlg.h Examining data/projecteur-0.8/src/projecteur-icons-def.h Examining data/projecteur-0.8/src/projecteurapp.cc Examining data/projecteur-0.8/src/projecteurapp.h Examining data/projecteur-0.8/src/runguard.cc Examining data/projecteur-0.8/src/runguard.h Examining data/projecteur-0.8/src/settings.cc Examining data/projecteur-0.8/src/settings.h Examining data/projecteur-0.8/src/spotlight.cc Examining data/projecteur-0.8/src/spotlight.h Examining data/projecteur-0.8/src/spotshapes.cc Examining data/projecteur-0.8/src/spotshapes.h Examining data/projecteur-0.8/src/virtualdevice.cc Examining data/projecteur-0.8/src/virtualdevice.h FINAL RESULTS: data/projecteur-0.8/src/virtualdevice.cc:40:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(location, F_OK) == -1) { data/projecteur-0.8/src/device.cc:104:22: [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). const int evfd = ::open(sd.deviceFile.toLocal8Bit().constData(), O_RDONLY, 0); data/projecteur-0.8/src/devicescan.cc:72: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). if (f.open(QIODevice::ReadOnly)) { data/projecteur-0.8/src/devicescan.cc:82: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). if (f.open(QIODevice::ReadOnly)) { data/projecteur-0.8/src/devicescan.cc:92: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). if (f.open(QIODevice::ReadOnly)) { data/projecteur-0.8/src/devicescan.cc:117: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 (!f.open(QIODevice::ReadOnly)) { data/projecteur-0.8/src/preferencesdlg.cc:705: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). if (f.open(QIODevice::WriteOnly)) data/projecteur-0.8/src/virtualdevice.cc:46: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). int fd = ::open(location, O_WRONLY | O_NDELAY); data/projecteur-0.8/src/virtualdevice.cc:86: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 sysfs_device_name[16]{}; data/projecteur-0.8/src/projecteurapp.cc:349:65: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). const auto command = QString::fromLocal8Bit(clientConnection->read(commandSize)); data/projecteur-0.8/src/spotlight.cc:226:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (::read(fd, &ev, sizeof(ev)) != sizeof(ev)) data/projecteur-0.8/src/spotlight.cc:322:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). const auto bytesRead = read(fd, buffer.data(), static_cast<size_t>(bytesAvaibable)); ANALYSIS SUMMARY: Hits = 12 Lines analyzed = 8903 in approximately 0.24 seconds (37456 lines/second) Physical Source Lines of Code (SLOC) = 7010 Hits@level = [0] 1 [1] 3 [2] 8 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 13 [1+] 12 [2+] 9 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 1.85449 [1+] 1.71184 [2+] 1.28388 [3+] 0.142653 [4+] 0.142653 [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.