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/qmidiarp-0.6.5/src/slider.cpp Examining data/qmidiarp-0.6.5/src/midicctable.cpp Examining data/qmidiarp-0.6.5/src/jackdriver.h Examining data/qmidiarp-0.6.5/src/midilfo.cpp Examining data/qmidiarp-0.6.5/src/seqscreen.cpp Examining data/qmidiarp-0.6.5/src/passwidget.h Examining data/qmidiarp-0.6.5/src/slider.h Examining data/qmidiarp-0.6.5/src/midicctable.h Examining data/qmidiarp-0.6.5/src/midicontrol.cpp Examining data/qmidiarp-0.6.5/src/indicator.cpp Examining data/qmidiarp-0.6.5/src/arpscreen.h Examining data/qmidiarp-0.6.5/src/lfowidget.h Examining data/qmidiarp-0.6.5/src/globstore.cpp Examining data/qmidiarp-0.6.5/src/logwidget.cpp Examining data/qmidiarp-0.6.5/src/storagebutton.h Examining data/qmidiarp-0.6.5/src/storagebutton.cpp Examining data/qmidiarp-0.6.5/src/lfowidget.cpp Examining data/qmidiarp-0.6.5/src/screen.cpp Examining data/qmidiarp-0.6.5/src/lfoscreen.h Examining data/qmidiarp-0.6.5/src/seqwidget_lv2.cpp Examining data/qmidiarp-0.6.5/src/seqdriver.h Examining data/qmidiarp-0.6.5/src/cursor.cpp Examining data/qmidiarp-0.6.5/src/lfoscreen.cpp Examining data/qmidiarp-0.6.5/src/engine.cpp Examining data/qmidiarp-0.6.5/src/nsm.h Examining data/qmidiarp-0.6.5/src/parstore.h Examining data/qmidiarp-0.6.5/src/cursor.h Examining data/qmidiarp-0.6.5/src/lfowidget_lv2.cpp Examining data/qmidiarp-0.6.5/src/midiarp_lv2.h Examining data/qmidiarp-0.6.5/src/midilfo_lv2.h Examining data/qmidiarp-0.6.5/src/driverbase.h Examining data/qmidiarp-0.6.5/src/midiseq.cpp Examining data/qmidiarp-0.6.5/src/jackdriver.cpp Examining data/qmidiarp-0.6.5/src/midiseq_lv2.cpp Examining data/qmidiarp-0.6.5/src/arpwidget.cpp Examining data/qmidiarp-0.6.5/src/parstore.cpp Examining data/qmidiarp-0.6.5/src/seqwidget.cpp Examining data/qmidiarp-0.6.5/src/lv2_common.h Examining data/qmidiarp-0.6.5/src/main.h Examining data/qmidiarp-0.6.5/src/midiworker.cpp Examining data/qmidiarp-0.6.5/src/midiseq_lv2.h Examining data/qmidiarp-0.6.5/src/main.cpp Examining data/qmidiarp-0.6.5/src/seqwidget_lv2.h Examining data/qmidiarp-0.6.5/src/passwidget.cpp Examining data/qmidiarp-0.6.5/src/engine.h Examining data/qmidiarp-0.6.5/src/groovewidget.cpp Examining data/qmidiarp-0.6.5/src/midievent.h Examining data/qmidiarp-0.6.5/src/arpwidget.h Examining data/qmidiarp-0.6.5/src/logwidget.h Examining data/qmidiarp-0.6.5/src/arpscreen.cpp Examining data/qmidiarp-0.6.5/src/inoutbox.h Examining data/qmidiarp-0.6.5/src/midiarp.h Examining data/qmidiarp-0.6.5/src/midilfo.h Examining data/qmidiarp-0.6.5/src/inoutbox.cpp Examining data/qmidiarp-0.6.5/src/arpwidget_lv2.cpp Examining data/qmidiarp-0.6.5/src/mainwindow.cpp Examining data/qmidiarp-0.6.5/src/seqwidget.h Examining data/qmidiarp-0.6.5/src/indicator.h Examining data/qmidiarp-0.6.5/src/midiworker.h Examining data/qmidiarp-0.6.5/src/screen.h Examining data/qmidiarp-0.6.5/src/midilfo_lv2.cpp Examining data/qmidiarp-0.6.5/src/groovewidget.h Examining data/qmidiarp-0.6.5/src/mainwindow.h Examining data/qmidiarp-0.6.5/src/seqdriver.cpp Examining data/qmidiarp-0.6.5/src/midiseq.h Examining data/qmidiarp-0.6.5/src/midiarp.cpp Examining data/qmidiarp-0.6.5/src/midiarp_lv2.cpp Examining data/qmidiarp-0.6.5/src/globstore.h Examining data/qmidiarp-0.6.5/src/seqscreen.h Examining data/qmidiarp-0.6.5/src/midicontrol.h Examining data/qmidiarp-0.6.5/src/arpwidget_lv2.h Examining data/qmidiarp-0.6.5/src/lfowidget_lv2.h FINAL RESULTS: data/qmidiarp-0.6.5/src/logwidget.cpp:79:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. qs.sprintf("Ch %2d, Note On %3d, Vel %3d, tick %d", data/qmidiarp-0.6.5/src/logwidget.cpp:84:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. qs.sprintf("Ch %2d, Note Off %3d, tick %d", ev.channel+1, data/qmidiarp-0.6.5/src/logwidget.cpp:89:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. qs.sprintf("Ch %2d, Ctrl %3d, Val %3d, tick %d", ev.channel+1, data/qmidiarp-0.6.5/src/logwidget.cpp:94:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. qs.sprintf("Ch %2d, Pitch %5d, tick %d", ev.channel+1, data/qmidiarp-0.6.5/src/logwidget.cpp:99:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. qs.sprintf("Ch %2d, PrgChg %5d, tick %d", ev.channel+1, data/qmidiarp-0.6.5/src/main.cpp:149: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/qmidiarp-0.6.5/src/main.cpp:96:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(getpid()); data/qmidiarp-0.6.5/src/main.cpp:97: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, "vhajUp:", options, data/qmidiarp-0.6.5/src/mainwindow.cpp:106:27: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *nsm_url = getenv( "NSM_URL" ); data/qmidiarp-0.6.5/src/arpwidget.cpp:440: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/qmidiarp-0.6.5/src/jackdriver.cpp:101: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/qmidiarp-0.6.5/src/main.cpp:139: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/qmidiarp-0.6.5/src/mainwindow.cpp:760: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/qmidiarp-0.6.5/src/mainwindow.cpp:960: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/qmidiarp-0.6.5/src/mainwindow.cpp:1238: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/qmidiarp-0.6.5/src/mainwindow.cpp:1283: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/qmidiarp-0.6.5/src/midiarp_lv2.cpp:260:34: [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. unsigned char d[3]; data/qmidiarp-0.6.5/src/midiarp_lv2.cpp:295:22: [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. unsigned char d[3]; data/qmidiarp-0.6.5/src/midilfo_lv2.cpp:240:26: [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. unsigned char d[3]; data/qmidiarp-0.6.5/src/midilfo_lv2.cpp:502: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 bt[pPlugin->maxNPoints * 2 + 1]; data/qmidiarp-0.6.5/src/midiseq_lv2.cpp:229:26: [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. unsigned char d[3]; data/qmidiarp-0.6.5/src/midiseq_lv2.cpp:261:22: [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. unsigned char d[3]; data/qmidiarp-0.6.5/src/midiseq_lv2.cpp:516: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 bt[pPlugin->maxNPoints * 2 + 1]; data/qmidiarp-0.6.5/src/nsm.h:110:24: [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). nsm_open_callback *open; data/qmidiarp-0.6.5/src/nsm.h:366:17: [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 ( ! nsm->open ) data/qmidiarp-0.6.5/src/nsm.h:369:18: [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 r = nsm->open( &argv[0]->s, &argv[1]->s, &argv[2]->s, &out_msg, nsm->open_userdata ); data/qmidiarp-0.6.5/src/seqdriver.cpp:44: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/qmidiarp-0.6.5/src/arpwidget_lv2.cpp:352:38: [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). lv2_atom_forge_string(&forge, c, strlen(c)); data/qmidiarp-0.6.5/src/arpwidget_lv2.cpp:396:10: [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 (!strlen(p)) return; data/qmidiarp-0.6.5/src/engine.cpp:938:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(5000); data/qmidiarp-0.6.5/src/mainwindow.cpp:1467: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) { data/qmidiarp-0.6.5/src/midiarp_lv2.cpp:413:38: [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). lv2_atom_forge_string(&forge, c, strlen(c)); data/qmidiarp-0.6.5/src/midiarp_lv2.cpp:468:19: [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). size_t size = strlen(c) + 1; data/qmidiarp-0.6.5/src/midilfo_lv2.cpp:512:19: [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). size_t size = strlen(value) + 1; data/qmidiarp-0.6.5/src/midilfo_lv2.cpp:526:12: [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). size = strlen(value1) + 1; data/qmidiarp-0.6.5/src/midiseq_lv2.cpp:526:19: [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). size_t size = strlen(value) + 1; data/qmidiarp-0.6.5/src/midiseq_lv2.cpp:540:12: [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). size = strlen(value1) + 1; ANALYSIS SUMMARY: Hits = 37 Lines analyzed = 21671 in approximately 0.53 seconds (41057 lines/second) Physical Source Lines of Code (SLOC) = 14708 Hits@level = [0] 18 [1] 10 [2] 18 [3] 3 [4] 6 [5] 0 Hits@level+ = [0+] 55 [1+] 37 [2+] 27 [3+] 9 [4+] 6 [5+] 0 Hits/KSLOC@level+ = [0+] 3.73946 [1+] 2.51564 [2+] 1.83574 [3+] 0.611912 [4+] 0.407941 [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.