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/ladspa-sdk-1.15/src/ladspa.h Examining data/ladspa-sdk-1.15/src/load.c Examining data/ladspa-sdk-1.15/src/default.c Examining data/ladspa-sdk-1.15/src/listplugins.c Examining data/ladspa-sdk-1.15/src/applyplugin.c Examining data/ladspa-sdk-1.15/src/plugins/delay.c Examining data/ladspa-sdk-1.15/src/plugins/filter.c Examining data/ladspa-sdk-1.15/src/plugins/noise.c Examining data/ladspa-sdk-1.15/src/plugins/sine.cpp Examining data/ladspa-sdk-1.15/src/plugins/amp.c Examining data/ladspa-sdk-1.15/src/search.c Examining data/ladspa-sdk-1.15/src/analyseplugin.c Examining data/ladspa-sdk-1.15/src/utils.h Examining data/ladspa-sdk-1.15/debian/tests/02_ladspah.c FINAL RESULTS: data/ladspa-sdk-1.15/src/load.c:75:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(pcBuffer + iNeedSlash + (pcEnd - pcStart), pcFilename); data/ladspa-sdk-1.15/src/load.c:96:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(pcBuffer, pcFilename); data/ladspa-sdk-1.15/src/plugins/sine.cpp:48:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(output, input); data/ladspa-sdk-1.15/src/search.c:60:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(pcFilename, pcDirectory); data/ladspa-sdk-1.15/src/search.c:63:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(pcFilename, psDirectoryEntry->d_name); data/ladspa-sdk-1.15/src/load.c:56:20: [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. pcLADSPAPath = getenv("LADSPA_PATH"); data/ladspa-sdk-1.15/src/search.c:100:18: [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. pcLADSPAPath = getenv("LADSPA_PATH"); data/ladspa-sdk-1.15/src/applyplugin.c:93: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 pcHeader[44]; data/ladspa-sdk-1.15/src/applyplugin.c:96:19: [2] (misc) fopen: 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). g_poInputFile = fopen(pcFilename, "rb"); data/ladspa-sdk-1.15/src/applyplugin.c:151: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 pcHeader[44]; data/ladspa-sdk-1.15/src/applyplugin.c:154:16: [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 const char pcHeaderBase[44] = { data/ladspa-sdk-1.15/src/applyplugin.c:170:20: [2] (misc) fopen: 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). g_poOutputFile = fopen(pcFilename, "wb"); data/ladspa-sdk-1.15/src/applyplugin.c:181: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(pcHeader, pcHeaderBase, 44); data/ladspa-sdk-1.15/src/load.c:97:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(pcBuffer, ".so"); data/ladspa-sdk-1.15/src/analyseplugin.c:69:17: [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). lLength = strlen(psDescriptor->Label); data/ladspa-sdk-1.15/src/analyseplugin.c:92: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). for (lSpaceIndex = strlen(psDescriptor->Label); data/ladspa-sdk-1.15/src/applyplugin.c:666:36: [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). bBadControls = (ppcArgv[2] + strlen(ppcArgv[2]) data/ladspa-sdk-1.15/src/applyplugin.c:672:36: [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). bBadControls = (ppcArgv[1] + strlen(ppcArgv[1]) data/ladspa-sdk-1.15/src/applyplugin.c:762:37: [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). bBadControls = (pcControlValue + strlen(pcControlValue) data/ladspa-sdk-1.15/src/load.c:35: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). iFilenameLength = strlen(pcFilename); data/ladspa-sdk-1.15/src/load.c:68:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pcBuffer, pcStart, pcEnd - pcStart); data/ladspa-sdk-1.15/src/plugins/sine.cpp:47:28: [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). char * output = new char[strlen(input) + 1]; data/ladspa-sdk-1.15/src/search.c:37:16: [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). lDirLength = strlen(pcDirectory); data/ladspa-sdk-1.15/src/search.c:58:6: [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). + strlen(psDirectoryEntry->d_name) data/ladspa-sdk-1.15/src/search.c:62:7: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(pcFilename, "/"); data/ladspa-sdk-1.15/src/search.c:118:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pcBuffer, pcStart, pcEnd - pcStart); ANALYSIS SUMMARY: Hits = 26 Lines analyzed = 4272 in approximately 0.50 seconds (8572 lines/second) Physical Source Lines of Code (SLOC) = 2724 Hits@level = [0] 107 [1] 12 [2] 7 [3] 2 [4] 5 [5] 0 Hits@level+ = [0+] 133 [1+] 26 [2+] 14 [3+] 7 [4+] 5 [5+] 0 Hits/KSLOC@level+ = [0+] 48.8253 [1+] 9.54479 [2+] 5.1395 [3+] 2.56975 [4+] 1.83554 [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.