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/cava-alsa-0.7.3/config.c Examining data/cava-alsa-0.7.3/config.h Examining data/cava-alsa-0.7.3/debug.h Examining data/cava-alsa-0.7.3/iniparser/src/dictionary.c Examining data/cava-alsa-0.7.3/iniparser/src/dictionary.h Examining data/cava-alsa-0.7.3/iniparser/src/iniparser.c Examining data/cava-alsa-0.7.3/iniparser/src/iniparser.h Examining data/cava-alsa-0.7.3/input/alsa.c Examining data/cava-alsa-0.7.3/input/alsa.h Examining data/cava-alsa-0.7.3/input/common.c Examining data/cava-alsa-0.7.3/input/common.h Examining data/cava-alsa-0.7.3/input/fifo.c Examining data/cava-alsa-0.7.3/input/fifo.h Examining data/cava-alsa-0.7.3/input/portaudio.c Examining data/cava-alsa-0.7.3/input/portaudio.h Examining data/cava-alsa-0.7.3/input/pulse.c Examining data/cava-alsa-0.7.3/input/pulse.h Examining data/cava-alsa-0.7.3/input/shmem.c Examining data/cava-alsa-0.7.3/input/shmem.h Examining data/cava-alsa-0.7.3/input/sndio.c Examining data/cava-alsa-0.7.3/input/sndio.h Examining data/cava-alsa-0.7.3/output/raw.c Examining data/cava-alsa-0.7.3/output/raw.h Examining data/cava-alsa-0.7.3/output/terminal_bcircle.c Examining data/cava-alsa-0.7.3/output/terminal_bcircle.h Examining data/cava-alsa-0.7.3/output/terminal_ncurses.c Examining data/cava-alsa-0.7.3/output/terminal_ncurses.h Examining data/cava-alsa-0.7.3/output/terminal_noncurses.c Examining data/cava-alsa-0.7.3/output/terminal_noncurses.h Examining data/cava-alsa-0.7.3/util.h Examining data/cava-alsa-0.7.3/cava.c FINAL RESULTS: data/cava-alsa-0.7.3/cava.c:261:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(PACKAGE " " VERSION "\n"); data/cava-alsa-0.7.3/cava.c:294:17: [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. system("setfont cava.psf >/dev/null 2>&1"); data/cava-alsa-0.7.3/cava.c:295:17: [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. system("setterm -blank 0"); data/cava-alsa-0.7.3/cava.c:318:9: [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(audio.source, p.audio_source); data/cava-alsa-0.7.3/cava.c:556:25: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(p.raw_target, F_OK) != -1) { data/cava-alsa-0.7.3/config.c:51:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf((char *)error->message + error->length, MAX_ERROR_LEN - error->length, fmt, args); data/cava-alsa-0.7.3/config.c:376:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(configPath, "%s/%s/", configHome, PACKAGE); data/cava-alsa-0.7.3/config.c:380:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(configPath, "%s/%s/", configHome, ".config"); data/cava-alsa-0.7.3/config.c:382:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(configPath, "%s/%s/%s/", configHome, ".config", PACKAGE); data/cava-alsa-0.7.3/config.c:393:9: [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(configPath, configFile); data/cava-alsa-0.7.3/config.c:535:17: [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(supported_methods, input_method_names[i]); data/cava-alsa-0.7.3/debug.h:8:20: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define debug(...) fprintf(stderr, __VA_ARGS__) data/cava-alsa-0.7.3/iniparser/src/iniparser.c:272:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(keym, "%s:", s); data/cava-alsa-0.7.3/iniparser/src/iniparser.c:305:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(keym, "%s:", s); data/cava-alsa-0.7.3/iniparser/src/iniparser.c:343:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(keym, "%s:", s); data/cava-alsa-0.7.3/iniparser/src/iniparser.c:704:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "%s:%s", section, key); data/cava-alsa-0.7.3/input/pulse.c:18: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(audio->source, i->default_sink_name); data/cava-alsa-0.7.3/input/pulse.c:121:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(audio->error_message, __FILE__ ": Could not open pulseaudio source: %s, %s. \ data/cava-alsa-0.7.3/input/pulse.c:130:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(audio->error_message, __FILE__ ": pa_simple_read() failed: %s\n", data/cava-alsa-0.7.3/input/sndio.c:21:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, __FILE__ ": Could not open sndio source: %s\n", audio->source); data/cava-alsa-0.7.3/input/sndio.c:27:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, __FILE__ ": Could not set required audio parameters\n"); data/cava-alsa-0.7.3/input/sndio.c:32:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, __FILE__ ": sio_start() failed\n"); data/cava-alsa-0.7.3/input/sndio.c:39:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, __FILE__ ": sio_read() failed: %s\n", strerror(errno)); data/cava-alsa-0.7.3/output/terminal_bcircle.c:80:5: [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. system("setfont >/dev/null 2>&1"); data/cava-alsa-0.7.3/output/terminal_bcircle.c:81:5: [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. system("setfont /usr/share/consolefonts/Lat2-Fixed16.psf.gz >/dev/null 2>&1"); data/cava-alsa-0.7.3/output/terminal_bcircle.c:82:5: [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. system("setterm -blank 10"); data/cava-alsa-0.7.3/output/terminal_bcircle.c:84:5: [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. system("clear"); data/cava-alsa-0.7.3/output/terminal_ncurses.c:270:5: [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. system("setfont >/dev/null 2>&1"); data/cava-alsa-0.7.3/output/terminal_ncurses.c:271:5: [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. system("setfont /usr/share/consolefonts/Lat2-Fixed16.psf.gz >/dev/null 2>&1"); data/cava-alsa-0.7.3/output/terminal_ncurses.c:272:5: [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. system("setterm -blank 10 >/dev/null 2>&1"); data/cava-alsa-0.7.3/output/terminal_ncurses.c:284:5: [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. system("clear"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:110:5: [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. system("setterm -cursor off"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:111:5: [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. system("setterm -blank 0"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:115:5: [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. system("clear"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:154:5: [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. system("clear"); // clearing in case of resieze data/cava-alsa-0.7.3/output/terminal_noncurses.c:234:31: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. cx += swprintf(frame_buffer + cx, buf_length - cx, L"\033[%dB", data/cava-alsa-0.7.3/output/terminal_noncurses.c:241:31: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. cx += swprintf(frame_buffer + cx, buf_length - cx, L"\033[%dC", data/cava-alsa-0.7.3/output/terminal_noncurses.c:247:31: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. cx += swprintf(frame_buffer + cx, buf_length - cx, L"\033[%dC", rest); data/cava-alsa-0.7.3/output/terminal_noncurses.c:252:31: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. cx += swprintf(frame_buffer + cx, buf_length - cx, spacestring); data/cava-alsa-0.7.3/output/terminal_noncurses.c:254:31: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. cx += swprintf(frame_buffer + cx, buf_length - cx, barstring[0]); data/cava-alsa-0.7.3/output/terminal_noncurses.c:256:31: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. cx += swprintf(frame_buffer + cx, buf_length - cx, barstring[current_cell]); data/cava-alsa-0.7.3/output/terminal_noncurses.c:260:29: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. swprintf(frame_buffer + cx, buf_length - cx, L"\033[%dC", bar_spacing); data/cava-alsa-0.7.3/output/terminal_noncurses.c:270:27: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. cx += swprintf(frame_buffer + cx, buf_length - cx, L"\n"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:292:5: [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. system("setfont >/dev/null 2>&1"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:293:5: [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. system("setfont /usr/share/consolefonts/Lat2-Fixed16.psf.gz >/dev/null 2>&1"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:294:5: [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. system("setterm -cursor on"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:295:5: [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. system("setterm -blank 10"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:296:5: [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. system("clear"); data/cava-alsa-0.7.3/cava.c:249:17: [3] (buffer) getopt: 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 ((c = getopt(argc, argv, "p:vh")) != -1) { data/cava-alsa-0.7.3/cava.c:307: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. if (!getenv("LANG")) data/cava-alsa-0.7.3/config.c:374:28: [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. char *configHome = getenv("XDG_CONFIG_HOME"); data/cava-alsa-0.7.3/config.c:378:26: [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. configHome = getenv("HOME"); data/cava-alsa-0.7.3/cava.c:201: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 configPath[PATH_MAX]; data/cava-alsa-0.7.3/cava.c:558:34: [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). fptest = open(p.raw_target, O_RDONLY | O_NONBLOCK, 0644); data/cava-alsa-0.7.3/cava.c:571:34: [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). fptest = open(p.raw_target, O_RDONLY | O_NONBLOCK, 0644); data/cava-alsa-0.7.3/cava.c:575:22: [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). fp = open(p.raw_target, O_WRONLY | O_NONBLOCK | O_CREAT, 0644); data/cava-alsa-0.7.3/cava.c:1147:17: [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(previous_frame, bars, 256 * sizeof(int)); data/cava-alsa-0.7.3/config.c:367:18: [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. bool load_config(char configPath[PATH_MAX], struct config_params *p, bool colorsOnly, data/cava-alsa-0.7.3/config.c:395:14: [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). fp = fopen(configPath, "ab+"); data/cava-alsa-0.7.3/config.c:405:14: [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). fp = fopen(configPath, "rb+"); data/cava-alsa-0.7.3/config.c:475:15: [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. const char *keys[p->userEQ_keys]; data/cava-alsa-0.7.3/config.c:531:9: [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 supported_methods[255] = ""; data/cava-alsa-0.7.3/config.c:536:17: [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(supported_methods, "' "); data/cava-alsa-0.7.3/config.h:66: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 message[MAX_ERROR_LEN]; data/cava-alsa-0.7.3/config.h:70:18: [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. bool load_config(char configPath[PATH_MAX], struct config_params *p, bool colorsOnly, data/cava-alsa-0.7.3/iniparser/src/dictionary.c:55: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(t, s, len); data/cava-alsa-0.7.3/iniparser/src/dictionary.c:86:5: [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(new_val, d->val, d->size * sizeof(char *)); data/cava-alsa-0.7.3/iniparser/src/dictionary.c:87:5: [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(new_key, d->key, d->size * sizeof(char *)); data/cava-alsa-0.7.3/iniparser/src/dictionary.c:88:5: [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(new_hash, d->hash, d->size * sizeof(unsigned)); data/cava-alsa-0.7.3/iniparser/src/iniparser.c:77: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(t, s, len); data/cava-alsa-0.7.3/iniparser/src/iniparser.c:262: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 keym[ASCIILINESZ + 1]; data/cava-alsa-0.7.3/iniparser/src/iniparser.c:294: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 keym[ASCIILINESZ + 1]; data/cava-alsa-0.7.3/iniparser/src/iniparser.c:335: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 keym[ASCIILINESZ + 1]; data/cava-alsa-0.7.3/iniparser/src/iniparser.c:377: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 tmp_str[ASCIILINESZ + 1]; data/cava-alsa-0.7.3/iniparser/src/iniparser.c:528: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 tmp_str[ASCIILINESZ + 1]; data/cava-alsa-0.7.3/iniparser/src/iniparser.c:543: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 tmp_str[ASCIILINESZ + 1]; data/cava-alsa-0.7.3/iniparser/src/iniparser.c:637: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 line[ASCIILINESZ + 1]; data/cava-alsa-0.7.3/iniparser/src/iniparser.c:638: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 section[ASCIILINESZ + 1]; data/cava-alsa-0.7.3/iniparser/src/iniparser.c:639: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 key[ASCIILINESZ + 1]; data/cava-alsa-0.7.3/iniparser/src/iniparser.c:640: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 tmp[(ASCIILINESZ * 2) + 1]; data/cava-alsa-0.7.3/iniparser/src/iniparser.c:641: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 val[ASCIILINESZ + 1]; data/cava-alsa-0.7.3/iniparser/src/iniparser.c:650:15: [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). if ((in = fopen(ininame, "r")) == NULL) { data/cava-alsa-0.7.3/input/common.h:37: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 error_message[1024]; data/cava-alsa-0.7.3/input/fifo.c:7:14: [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 fd = open(path, O_RDONLY); data/cava-alsa-0.7.3/input/pulse.c:21:21: [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. audio->source = strcat(audio->source, ".monitor"); data/cava-alsa-0.7.3/output/raw.c:10:19: [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 bar_delim, char frame_delim, int const f[200]) { data/cava-alsa-0.7.3/output/raw.c:10:35: [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 bar_delim, char frame_delim, int const f[200]) { data/cava-alsa-0.7.3/output/raw.c:39:13: [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 bar_height[bar_height_size]; data/cava-alsa-0.7.3/output/raw.h:2:19: [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 bar_delim, char frame_delim, int const f[200]); data/cava-alsa-0.7.3/output/raw.h:2:35: [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 bar_delim, char frame_delim, int const f[200]); data/cava-alsa-0.7.3/output/terminal_ncurses.c:101:9: [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 next_color[14]; data/cava-alsa-0.7.3/output/terminal_ncurses.c:142:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(next_color, "#%02x%02x%02x", rgb[col + 1][0], rgb[col + 1][1], data/cava-alsa-0.7.3/output/terminal_ncurses.c:154:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(next_color, "#%02x%02x%02x", rgb[col][0], rgb[col][1], rgb[col][2]); data/cava-alsa-0.7.3/output/terminal_noncurses.c:12:1: [2] (buffer) wchar_t: 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. wchar_t *barstring[8]; data/cava-alsa-0.7.3/output/terminal_noncurses.c:16:1: [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 *ttybarstring[8]; data/cava-alsa-0.7.3/output/terminal_noncurses.c:96:13: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(barstring[0], L"\u2588"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:97:13: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(barstring[1], L"\u2581"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:98:13: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(barstring[2], L"\u2582"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:99:13: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(barstring[3], L"\u2583"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:100:13: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(barstring[4], L"\u2584"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:101:13: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(barstring[5], L"\u2585"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:102:13: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(barstring[6], L"\u2586"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:103:13: [2] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. wcscat(barstring[7], L"\u2587"); data/cava-alsa-0.7.3/cava.c:123:50: [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). return strncmp(text, LOOPBACK_DEVICE_PREFIX, strlen(LOOPBACK_DEVICE_PREFIX)) == 0; data/cava-alsa-0.7.3/cava.c:317:35: [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). audio.source = malloc(1 + strlen(p.audio_source)); data/cava-alsa-0.7.3/config.c:59:33: [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 (checkColor[0] == '#' && strlen(checkColor) == 7) { data/cava-alsa-0.7.3/config.c:534:17: [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(supported_methods, "'"); data/cava-alsa-0.7.3/iniparser/src/dictionary.c:52:11: [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). len = strlen(s) + 1; data/cava-alsa-0.7.3/iniparser/src/dictionary.c:124:11: [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). len = strlen(key); data/cava-alsa-0.7.3/iniparser/src/iniparser.c:74:11: [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). len = strlen(s) + 1; data/cava-alsa-0.7.3/iniparser/src/iniparser.c:96: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). last = s + strlen(s); data/cava-alsa-0.7.3/iniparser/src/iniparser.c:270: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). seclen = (int)strlen(s); data/cava-alsa-0.7.3/iniparser/src/iniparser.c:304: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). seclen = (int)strlen(s); data/cava-alsa-0.7.3/iniparser/src/iniparser.c:342: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). seclen = (int)strlen(s); data/cava-alsa-0.7.3/iniparser/src/iniparser.c:668:20: [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). len = (int)strlen(line) - 1; data/cava-alsa-0.7.3/input/fifo.c:28:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int num_read = read(fd, buf + offset, sizeof(buf) - offset); data/cava-alsa-0.7.3/output/terminal_noncurses.c:70:13: [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(ttybarstring[0], "H"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:71:13: [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(ttybarstring[1], "A"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:72:13: [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(ttybarstring[2], "B"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:73:13: [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(ttybarstring[3], "C"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:74:13: [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(ttybarstring[4], "D"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:75:13: [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(ttybarstring[5], "E"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:76:13: [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(ttybarstring[6], "F"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:77:13: [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(ttybarstring[7], "G"); data/cava-alsa-0.7.3/output/terminal_noncurses.c:78:13: [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(ttyspacestring, " "); data/cava-alsa-0.7.3/output/terminal_noncurses.c:104:13: [1] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant character. wcscat(spacestring, L" "); ANALYSIS SUMMARY: Hits = 126 Lines analyzed = 5059 in approximately 0.17 seconds (29475 lines/second) Physical Source Lines of Code (SLOC) = 3265 Hits@level = [0] 88 [1] 23 [2] 51 [3] 4 [4] 48 [5] 0 Hits@level+ = [0+] 214 [1+] 126 [2+] 103 [3+] 52 [4+] 48 [5+] 0 Hits/KSLOC@level+ = [0+] 65.5436 [1+] 38.5911 [2+] 31.5467 [3+] 15.9265 [4+] 14.7014 [5+] 0 Dot directories skipped = 2 (--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.