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/qmidiroute-0.4.0/src/midimap.h Examining data/qmidiroute-0.4.0/src/mapdata.h Examining data/qmidiroute-0.4.0/src/mapdata.cpp Examining data/qmidiroute-0.4.0/src/midimap.cpp Examining data/qmidiroute-0.4.0/src/mapwidget.cpp Examining data/qmidiroute-0.4.0/src/passwidget.h Examining data/qmidiroute-0.4.0/src/mainwindow.h Examining data/qmidiroute-0.4.0/src/seqdriver.cpp Examining data/qmidiroute-0.4.0/src/main.cpp Examining data/qmidiroute-0.4.0/src/mainwindow.cpp Examining data/qmidiroute-0.4.0/src/seqdriver.h Examining data/qmidiroute-0.4.0/src/passwidget.cpp Examining data/qmidiroute-0.4.0/src/logwidget.cpp Examining data/qmidiroute-0.4.0/src/main.h Examining data/qmidiroute-0.4.0/src/logwidget.h Examining data/qmidiroute-0.4.0/src/mapwidget.h FINAL RESULTS: data/qmidiroute-0.4.0/src/logwidget.cpp:68:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. qs.sprintf("Ch %2d, Note On %3d, Vel %3d", data/qmidiroute-0.4.0/src/logwidget.cpp:74:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. qs.sprintf("Ch %2d, Note Off %3d", ev->data.control.channel + 1, data/qmidiroute-0.4.0/src/logwidget.cpp:79:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. qs.sprintf("Ch %2d, Ctrl %3d, Val %3d", ev->data.control.channel + 1, data/qmidiroute-0.4.0/src/logwidget.cpp:84:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. qs.sprintf("Ch %2d, Pitch %5d", ev->data.control.channel + 1, data/qmidiroute-0.4.0/src/logwidget.cpp:89:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. qs.sprintf("Ch %2d, PrgChg %5d", ev->data.control.channel + 1, data/qmidiroute-0.4.0/src/main.cpp:59:28: [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. QLocale loc = QLocale::system(); data/qmidiroute-0.4.0/src/main.cpp:29:29: [3] (buffer) getopt_long: 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 ((getopt_return = getopt_long(argc, argv, "vhp:", options, data/qmidiroute-0.4.0/src/main.cpp:33:29: [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). portCount = atoi(optarg); data/qmidiroute-0.4.0/src/mainwindow.cpp:402: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/qmidiroute-0.4.0/src/mainwindow.cpp:463: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::WriteOnly)) { data/qmidiroute-0.4.0/src/seqdriver.cpp:42: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 buf[16]; data/qmidiroute-0.4.0/src/mainwindow.cpp:576:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &message, sizeof(message)) == -1) { ANALYSIS SUMMARY: Hits = 12 Lines analyzed = 2475 in approximately 0.07 seconds (33589 lines/second) Physical Source Lines of Code (SLOC) = 2054 Hits@level = [0] 1 [1] 1 [2] 4 [3] 1 [4] 6 [5] 0 Hits@level+ = [0+] 13 [1+] 12 [2+] 11 [3+] 7 [4+] 6 [5+] 0 Hits/KSLOC@level+ = [0+] 6.32911 [1+] 5.84226 [2+] 5.3554 [3+] 3.40798 [4+] 2.92113 [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.