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/lv2-c++-tools-1.0.5/headers/lv2_uri_map.h Examining data/lv2-c++-tools-1.0.5/headers/lv2_event.h Examining data/lv2-c++-tools-1.0.5/headers/lv2_contexts.h Examining data/lv2-c++-tools-1.0.5/headers/lv2_ui.h Examining data/lv2-c++-tools-1.0.5/headers/lv2.h Examining data/lv2-c++-tools-1.0.5/headers/lv2_ui_presets.h Examining data/lv2-c++-tools-1.0.5/headers/lv2_event_helpers.h Examining data/lv2-c++-tools-1.0.5/headers/lv2types.hpp Examining data/lv2-c++-tools-1.0.5/headers/lv2_saverestore.h Examining data/lv2-c++-tools-1.0.5/headers/lv2_osc.h Examining data/lv2-c++-tools-1.0.5/programs/lv2peg/lv2peg.cpp Examining data/lv2-c++-tools-1.0.5/libraries/lv2gui/lv2gui.hpp Examining data/lv2-c++-tools-1.0.5/libraries/lv2gui/lv2gui.cpp Examining data/lv2-c++-tools-1.0.5/libraries/lv2plugin/lv2synth.hpp Examining data/lv2-c++-tools-1.0.5/libraries/lv2plugin/lv2plugin.hpp Examining data/lv2-c++-tools-1.0.5/libraries/lv2plugin/lv2plugin.cpp Examining data/lv2-c++-tools-1.0.5/libraries/paq/query.cpp Examining data/lv2-c++-tools-1.0.5/libraries/paq/rdf.cpp Examining data/lv2-c++-tools-1.0.5/libraries/paq/namespaces.hpp Examining data/lv2-c++-tools-1.0.5/libraries/paq/query.hpp Examining data/lv2-c++-tools-1.0.5/libraries/paq/rdf.hpp Examining data/lv2-c++-tools-1.0.5/libraries/paq/unicode.hpp Examining data/lv2-c++-tools-1.0.5/libraries/paq/turtleparser.hpp Examining data/lv2-c++-tools-1.0.5/libraries/paq/turtleparser.cpp FINAL RESULTS: data/lv2-c++-tools-1.0.5/headers/lv2_event_helpers.h:192:9: [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((uint8_t*)ev + sizeof(LV2_Event), data, size); data/lv2-c++-tools-1.0.5/headers/lv2_event_helpers.h:251:9: [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((uint8_t*)write_ev + sizeof(LV2_Event), data, ev->size); data/lv2-c++-tools-1.0.5/headers/lv2_osc.h:185:3: [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(event_buffer + event_size, path, path_length); data/lv2-c++-tools-1.0.5/headers/lv2_osc.h:191:3: [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(event_buffer + event_size, types, n_args); data/lv2-c++-tools-1.0.5/headers/lv2_osc.h:211:7: [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(event_buffer + event_size, sptr, strlen(sptr)); data/lv2-c++-tools-1.0.5/headers/lv2_osc.h:219:7: [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(event_buffer + event_size, bptr, blob_size); data/lv2-c++-tools-1.0.5/libraries/lv2plugin/lv2plugin.hpp:217:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(c_uri, uri.c_str(), uri.size() + 1); data/lv2-c++-tools-1.0.5/libraries/paq/turtleparser.cpp:626: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 ((fd = open(file.c_str(), O_RDONLY)) == -1) data/lv2-c++-tools-1.0.5/libraries/paq/turtleparser.cpp:640:14: [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. static char buf[1024]; data/lv2-c++-tools-1.0.5/programs/lv2peg/lv2peg.cpp:119:24: [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). int port_index = atoi(qr[i][index]->name.c_str()); data/lv2-c++-tools-1.0.5/programs/lv2peg/lv2peg.cpp:140:24: [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). int port_index = atoi(qr[i][index]->name.c_str()); data/lv2-c++-tools-1.0.5/programs/lv2peg/lv2peg.cpp:168:13: [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). ports[atoi(qr[i][index]->name.c_str())].min = data/lv2-c++-tools-1.0.5/programs/lv2peg/lv2peg.cpp:178:13: [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). ports[atoi(qr[i][index]->name.c_str())].max = data/lv2-c++-tools-1.0.5/programs/lv2peg/lv2peg.cpp:188:13: [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). ports[atoi(qr[i][index]->name.c_str())].default_value = data/lv2-c++-tools-1.0.5/programs/lv2peg/lv2peg.cpp:200:15: [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). ports[atoi(qr[i][index]->name.c_str())].toggled = true; data/lv2-c++-tools-1.0.5/programs/lv2peg/lv2peg.cpp:202:15: [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). ports[atoi(qr[i][index]->name.c_str())].integer = true; data/lv2-c++-tools-1.0.5/programs/lv2peg/lv2peg.cpp:204:15: [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). ports[atoi(qr[i][index]->name.c_str())].logarithmic = true; data/lv2-c++-tools-1.0.5/headers/lv2_osc.h:119:21: [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). uint32_t n_args = strlen(types); data/lv2-c++-tools-1.0.5/headers/lv2_osc.h:120:26: [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). uint32_t path_length = strlen(path); data/lv2-c++-tools-1.0.5/headers/lv2_osc.h:142: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). event_size += lv2_osc_pad_size(strlen(sptr) + 1); data/lv2-c++-tools-1.0.5/headers/lv2_osc.h:173:21: [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). uint32_t n_args = strlen(types); data/lv2-c++-tools-1.0.5/headers/lv2_osc.h:174:26: [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). uint32_t path_length = strlen(path); data/lv2-c++-tools-1.0.5/headers/lv2_osc.h:211:47: [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). memcpy(event_buffer + event_size, sptr, strlen(sptr)); data/lv2-c++-tools-1.0.5/headers/lv2_osc.h:212:42: [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). memset(event_buffer + event_size + strlen(sptr), 0, data/lv2-c++-tools-1.0.5/headers/lv2_osc.h:213:24: [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_osc_pad_size(strlen(sptr) + 1) - strlen(sptr)); data/lv2-c++-tools-1.0.5/headers/lv2_osc.h:213:44: [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_osc_pad_size(strlen(sptr) + 1) - strlen(sptr)); data/lv2-c++-tools-1.0.5/headers/lv2_osc.h:214: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). event_size += lv2_osc_pad_size(strlen(sptr) + 1); ANALYSIS SUMMARY: Hits = 27 Lines analyzed = 7032 in approximately 0.26 seconds (27027 lines/second) Physical Source Lines of Code (SLOC) = 3168 Hits@level = [0] 0 [1] 10 [2] 17 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 27 [1+] 27 [2+] 17 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 8.52273 [1+] 8.52273 [2+] 5.36616 [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.