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/alsaequal-0.6/ladspa_utils.c Examining data/alsaequal-0.6/ladspa_utils.h Examining data/alsaequal-0.6/pcm_equal.c Examining data/alsaequal-0.6/ctl_equal.c FINAL RESULTS: data/alsaequal-0.6/ctl_equal.c:281:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(equal->control_info[i].name, "%02d. %s%s", data/alsaequal-0.6/ladspa_utils.c:76:2: [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/alsaequal-0.6/ladspa_utils.c:98: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/alsaequal-0.6/ladspa_utils.c:286:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s", controls_filename); data/alsaequal-0.6/ladspa_utils.c:296:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s/%s", homePath, controls_filename); data/alsaequal-0.6/ladspa_utils.c:57: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/alsaequal-0.6/ladspa_utils.c:288:14: [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. homePath = getenv("HOME"); data/alsaequal-0.6/ladspa_utils.c:99: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/alsaequal-0.6/ladspa_utils.c:318:7: [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). fd = open(filename, O_RDWR); data/alsaequal-0.6/ladspa_utils.c:323:9: [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). fd = open(filename, O_RDWR | O_CREAT, 0664); data/alsaequal-0.6/ctl_equal.c:52:7: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. free(equal); data/alsaequal-0.6/ctl_equal.c:162:28: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. SND_CTL_PLUGIN_DEFINE_FUNC(equal) data/alsaequal-0.6/ctl_equal.c:167:19: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. snd_ctl_equal_t *equal; data/alsaequal-0.6/ctl_equal.c:208:28: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. equal = calloc(1, sizeof(*equal)); data/alsaequal-0.6/ctl_equal.c:216:28: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. equal->ext.private_data = equal; data/alsaequal-0.6/ctl_equal.c:230:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(equal->ext.id, equal->klass->Label, sizeof(equal->ext.id)); data/alsaequal-0.6/ctl_equal.c:231:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(equal->ext.driver, "LADSPA Plugin", sizeof(equal->ext.driver)); data/alsaequal-0.6/ctl_equal.c:232:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(equal->ext.name, equal->klass->Label, sizeof(equal->ext.name)); data/alsaequal-0.6/ctl_equal.c:233:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(equal->ext.longname, equal->klass->Name, data/alsaequal-0.6/ctl_equal.c:235:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(equal->ext.mixername, "alsaequal", sizeof(equal->ext.mixername)); data/alsaequal-0.6/ctl_equal.c:276: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(equal->klass->PortNames[index]) + data/alsaequal-0.6/ctl_equal.c:277: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(sufix) + 6); data/alsaequal-0.6/ctl_equal.c:303:23: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. SND_CTL_PLUGIN_SYMBOL(equal); data/alsaequal-0.6/ladspa_utils.c:36: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/alsaequal-0.6/ladspa_utils.c:69:4: [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/alsaequal-0.6/ladspa_utils.c:282: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). filename = malloc(strlen(controls_filename) + 1); data/alsaequal-0.6/ladspa_utils.c:292: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). filename = malloc(strlen(controls_filename) + strlen(homePath) + 2); data/alsaequal-0.6/ladspa_utils.c:292:49: [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). filename = malloc(strlen(controls_filename) + strlen(homePath) + 2); data/alsaequal-0.6/pcm_equal.c:108:7: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. free(equal); data/alsaequal-0.6/pcm_equal.c:147:28: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. SND_PCM_PLUGIN_DEFINE_FUNC(equal) data/alsaequal-0.6/pcm_equal.c:150:19: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. snd_pcm_equal_t *equal; data/alsaequal-0.6/pcm_equal.c:201:28: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. equal = calloc(1, sizeof(*equal) + channels*sizeof(LADSPA_Handle *)); data/alsaequal-0.6/pcm_equal.c:208:28: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. equal->ext.private_data = equal; data/alsaequal-0.6/pcm_equal.c:264:23: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. SND_PCM_PLUGIN_SYMBOL(equal); ANALYSIS SUMMARY: Hits = 34 Lines analyzed = 1052 in approximately 0.05 seconds (19905 lines/second) Physical Source Lines of Code (SLOC) = 798 Hits@level = [0] 10 [1] 24 [2] 3 [3] 2 [4] 5 [5] 0 Hits@level+ = [0+] 44 [1+] 34 [2+] 10 [3+] 7 [4+] 5 [5+] 0 Hits/KSLOC@level+ = [0+] 55.1378 [1+] 42.6065 [2+] 12.5313 [3+] 8.77193 [4+] 6.26566 [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.