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/cmus-2.8.0/Doc/ttman.c Examining data/cmus-2.8.0/ape.c Examining data/cmus-2.8.0/ape.h Examining data/cmus-2.8.0/browser.c Examining data/cmus-2.8.0/browser.h Examining data/cmus-2.8.0/buffer.c Examining data/cmus-2.8.0/buffer.h Examining data/cmus-2.8.0/cache.c Examining data/cmus-2.8.0/cache.h Examining data/cmus-2.8.0/channelmap.c Examining data/cmus-2.8.0/channelmap.h Examining data/cmus-2.8.0/cmdline.c Examining data/cmus-2.8.0/cmdline.h Examining data/cmus-2.8.0/cmus.c Examining data/cmus-2.8.0/cmus.h Examining data/cmus-2.8.0/command_mode.c Examining data/cmus-2.8.0/command_mode.h Examining data/cmus-2.8.0/comment.c Examining data/cmus-2.8.0/comment.h Examining data/cmus-2.8.0/compiler.h Examining data/cmus-2.8.0/convert.c Examining data/cmus-2.8.0/convert.h Examining data/cmus-2.8.0/cue.c Examining data/cmus-2.8.0/cue.h Examining data/cmus-2.8.0/cue_utils.c Examining data/cmus-2.8.0/cue_utils.h Examining data/cmus-2.8.0/debug.c Examining data/cmus-2.8.0/debug.h Examining data/cmus-2.8.0/discid.c Examining data/cmus-2.8.0/discid.h Examining data/cmus-2.8.0/editable.c Examining data/cmus-2.8.0/editable.h Examining data/cmus-2.8.0/expr.c Examining data/cmus-2.8.0/expr.h Examining data/cmus-2.8.0/file.c Examining data/cmus-2.8.0/file.h Examining data/cmus-2.8.0/filters.c Examining data/cmus-2.8.0/filters.h Examining data/cmus-2.8.0/format_print.c Examining data/cmus-2.8.0/format_print.h Examining data/cmus-2.8.0/gbuf.c Examining data/cmus-2.8.0/gbuf.h Examining data/cmus-2.8.0/glob.c Examining data/cmus-2.8.0/glob.h Examining data/cmus-2.8.0/help.c Examining data/cmus-2.8.0/help.h Examining data/cmus-2.8.0/history.c Examining data/cmus-2.8.0/history.h Examining data/cmus-2.8.0/http.c Examining data/cmus-2.8.0/http.h Examining data/cmus-2.8.0/id3.c Examining data/cmus-2.8.0/id3.h Examining data/cmus-2.8.0/input.c Examining data/cmus-2.8.0/input.h Examining data/cmus-2.8.0/ip.h Examining data/cmus-2.8.0/ip/aac.c Examining data/cmus-2.8.0/ip/aac.h Examining data/cmus-2.8.0/ip/bass.c Examining data/cmus-2.8.0/ip/cdio.c Examining data/cmus-2.8.0/ip/cue.c Examining data/cmus-2.8.0/ip/ffmpeg.c Examining data/cmus-2.8.0/ip/flac.c Examining data/cmus-2.8.0/ip/mad.c Examining data/cmus-2.8.0/ip/mikmod.c Examining data/cmus-2.8.0/ip/modplug.c Examining data/cmus-2.8.0/ip/mp4.c Examining data/cmus-2.8.0/ip/mpc.c Examining data/cmus-2.8.0/ip/nomad.c Examining data/cmus-2.8.0/ip/nomad.h Examining data/cmus-2.8.0/ip/opus.c Examining data/cmus-2.8.0/ip/vorbis.c Examining data/cmus-2.8.0/ip/vtx.c Examining data/cmus-2.8.0/ip/wav.c Examining data/cmus-2.8.0/ip/wavpack.c Examining data/cmus-2.8.0/iter.h Examining data/cmus-2.8.0/job.c Examining data/cmus-2.8.0/job.h Examining data/cmus-2.8.0/keys.c Examining data/cmus-2.8.0/keys.h Examining data/cmus-2.8.0/keyval.c Examining data/cmus-2.8.0/keyval.h Examining data/cmus-2.8.0/lib.c Examining data/cmus-2.8.0/lib.h Examining data/cmus-2.8.0/list.h Examining data/cmus-2.8.0/load_dir.c Examining data/cmus-2.8.0/load_dir.h Examining data/cmus-2.8.0/locking.c Examining data/cmus-2.8.0/locking.h Examining data/cmus-2.8.0/main.c Examining data/cmus-2.8.0/mergesort.c Examining data/cmus-2.8.0/mergesort.h Examining data/cmus-2.8.0/misc.c Examining data/cmus-2.8.0/misc.h Examining data/cmus-2.8.0/mixer.h Examining data/cmus-2.8.0/mpris.c Examining data/cmus-2.8.0/mpris.h Examining data/cmus-2.8.0/op.h Examining data/cmus-2.8.0/op/alsa.c Examining data/cmus-2.8.0/op/ao.c Examining data/cmus-2.8.0/op/arts.c Examining data/cmus-2.8.0/op/coreaudio.c Examining data/cmus-2.8.0/op/mixer_alsa.c Examining data/cmus-2.8.0/op/mixer_oss.c Examining data/cmus-2.8.0/op/mixer_sun.c Examining data/cmus-2.8.0/op/oss.c Examining data/cmus-2.8.0/op/pulse.c Examining data/cmus-2.8.0/op/roar.c Examining data/cmus-2.8.0/op/sndio.c Examining data/cmus-2.8.0/op/sun.c Examining data/cmus-2.8.0/op/waveout.c Examining data/cmus-2.8.0/op/jack.c Examining data/cmus-2.8.0/options.c Examining data/cmus-2.8.0/options.h Examining data/cmus-2.8.0/output.c Examining data/cmus-2.8.0/output.h Examining data/cmus-2.8.0/path.c Examining data/cmus-2.8.0/path.h Examining data/cmus-2.8.0/pcm.c Examining data/cmus-2.8.0/pcm.h Examining data/cmus-2.8.0/pl.c Examining data/cmus-2.8.0/pl.h Examining data/cmus-2.8.0/play_queue.c Examining data/cmus-2.8.0/play_queue.h Examining data/cmus-2.8.0/player.c Examining data/cmus-2.8.0/player.h Examining data/cmus-2.8.0/prog.c Examining data/cmus-2.8.0/prog.h Examining data/cmus-2.8.0/rbtree.c Examining data/cmus-2.8.0/rbtree.h Examining data/cmus-2.8.0/read_wrapper.c Examining data/cmus-2.8.0/read_wrapper.h Examining data/cmus-2.8.0/search.c Examining data/cmus-2.8.0/search.h Examining data/cmus-2.8.0/search_mode.c Examining data/cmus-2.8.0/search_mode.h Examining data/cmus-2.8.0/server.c Examining data/cmus-2.8.0/server.h Examining data/cmus-2.8.0/sf.h Examining data/cmus-2.8.0/spawn.c Examining data/cmus-2.8.0/spawn.h Examining data/cmus-2.8.0/tabexp.c Examining data/cmus-2.8.0/tabexp.h Examining data/cmus-2.8.0/tabexp_file.c Examining data/cmus-2.8.0/tabexp_file.h Examining data/cmus-2.8.0/track.c Examining data/cmus-2.8.0/track.h Examining data/cmus-2.8.0/track_info.c Examining data/cmus-2.8.0/track_info.h Examining data/cmus-2.8.0/tree.c Examining data/cmus-2.8.0/u_collate.c Examining data/cmus-2.8.0/u_collate.h Examining data/cmus-2.8.0/uchar.c Examining data/cmus-2.8.0/uchar.h Examining data/cmus-2.8.0/ui_curses.c Examining data/cmus-2.8.0/ui_curses.h Examining data/cmus-2.8.0/unidecomp.h Examining data/cmus-2.8.0/utils.h Examining data/cmus-2.8.0/window.c Examining data/cmus-2.8.0/window.h Examining data/cmus-2.8.0/worker.c Examining data/cmus-2.8.0/worker.h Examining data/cmus-2.8.0/xmalloc.c Examining data/cmus-2.8.0/xmalloc.h Examining data/cmus-2.8.0/xstrjoin.c Examining data/cmus-2.8.0/xstrjoin.h FINAL RESULTS: data/cmus-2.8.0/job.c:292:13: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. int rc = readlink(dir.path, buf, sizeof(buf)); data/cmus-2.8.0/Doc/ttman.c:100:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/cmus-2.8.0/Doc/ttman.c:111:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/cmus-2.8.0/Doc/ttman.c:578:21: [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 output(...) fprintf(outfile, __VA_ARGS__) data/cmus-2.8.0/command_mode.c:2379:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(line, "%s=%s", e->name, e->filter); data/cmus-2.8.0/command_mode.c:2754:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cmdline.line, "%s%s", tmp, s2); data/cmus-2.8.0/compiler.h:57:63: [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. #define CMUS_FORMAT(fmt_idx, first_idx) __attribute__((format(printf, (fmt_idx), (first_idx)))) data/cmus-2.8.0/debug.c:60:2: [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(debug_stream, format, function); data/cmus-2.8.0/debug.c:62:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(debug_stream, fmt, ap); data/cmus-2.8.0/debug.c:67:2: [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, format, function); data/cmus-2.8.0/debug.c:69:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/cmus-2.8.0/debug.c:81:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(debug_stream, fmt, ap); data/cmus-2.8.0/expr.c:93:2: [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(error_buf, sizeof(error_buf), format, ap); data/cmus-2.8.0/expr.c:593:4: [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(out+k, key); data/cmus-2.8.0/expr.c:658:6: [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(out+k, key); data/cmus-2.8.0/format_print.c:594: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(buf + pos + ws_len, r_str.buffer); data/cmus-2.8.0/format_print.c:609: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(buf + pos, r_str.buffer + idx); data/cmus-2.8.0/gbuf.c:90: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. slen = vsnprintf(buf->buffer + buf->len, buf->alloc - buf->len, fmt, ap); data/cmus-2.8.0/gbuf.c:97:10: [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. slen = vsnprintf(buf->buffer + buf->len, buf->alloc - buf->len, fmt, ap); data/cmus-2.8.0/ip/wavpack.c:183:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename_wvc, "%sc", ip_data->filename); data/cmus-2.8.0/ip/wavpack.c:408:3: [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(buf, xmode); data/cmus-2.8.0/main.c:91:2: [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(buf, sizeof(buf), format, ap); data/cmus-2.8.0/main.c:294:4: [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(usage, program_name, program_name, program_name); data/cmus-2.8.0/mpris.c:170:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf, "/%"PRIx64, player_info.ti->uid); data/cmus-2.8.0/mpris.c:370:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf, "/%"PRIx64, ti->uid); data/cmus-2.8.0/op/ao.c:99: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(buf, ao_channel_mapping[j].str); data/cmus-2.8.0/pl.c:528: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(name, file); data/cmus-2.8.0/pl.c:612:6: [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(tmp, F_OK) != 0 || yes_no_query("File exists. Overwrite? [y/N]")) data/cmus-2.8.0/player.c:476:2: [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(buffer, sizeof(buffer), format, ap); data/cmus-2.8.0/player.c:493:2: [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(buffer, sizeof(buffer), format, ap); data/cmus-2.8.0/prog.c:35:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/cmus-2.8.0/prog.c:46:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/cmus-2.8.0/prog.c:57:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/cmus-2.8.0/prog.c:69:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/cmus-2.8.0/server.c:190:2: [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(buf, sizeof(buf), format, ap); data/cmus-2.8.0/spawn.c:77:3: [4] (shell) execvp: 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. execvp(argv[0], argv); data/cmus-2.8.0/tree.c:506:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s, %c%c%c", name, name_orig[0], data/cmus-2.8.0/ui_curses.c:1089: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(buf + 1, path + home_len); data/cmus-2.8.0/ui_curses.c:1562:2: [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(error_buf, sizeof(error_buf), format, ap); data/cmus-2.8.0/ui_curses.c:1581:2: [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(error_buf + 7, sizeof(error_buf) - 7, format, ap); data/cmus-2.8.0/ui_curses.c:1609:2: [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(buffer, sizeof(buffer), format, ap); data/cmus-2.8.0/ui_curses.c:2488:4: [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(usage, program_name); data/cmus-2.8.0/cmus.c:453:9: [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. return getenv("DISPLAY") && getenv("WINDOWID"); data/cmus-2.8.0/cmus.c:453:30: [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. return getenv("DISPLAY") && getenv("WINDOWID"); data/cmus-2.8.0/cmus.c:493: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. xid_str = getenv("WINDOWID"); data/cmus-2.8.0/debug.c:35: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. const char *dir = getenv("CMUS_HOME"); data/cmus-2.8.0/debug.c:38:9: [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. dir = getenv("HOME"); data/cmus-2.8.0/http.c:150:16: [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 *proxy = getenv("http_proxy"); data/cmus-2.8.0/ip/cdio.c:318:10: [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. proxy = getenv("http_proxy"); data/cmus-2.8.0/lib.c:337:2: [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(time(NULL)); data/cmus-2.8.0/misc.c:185:8: [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. val = getenv(name); data/cmus-2.8.0/misc.c:273:17: [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. cmus_lib_dir = getenv("CMUS_LIB_DIR"); data/cmus-2.8.0/misc.c:277: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. cmus_data_dir = getenv("CMUS_DATA_DIR"); data/cmus-2.8.0/tabexp_file.c:211:25: [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 *env_path = getenv("PATH"); data/cmus-2.8.0/ui_curses.c:2317:9: [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. term = getenv("TERM"); data/cmus-2.8.0/ui_curses.c:2343:7: [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("ESCDELAY")) { data/cmus-2.8.0/ui_curses.c:2509:12: [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. charset = getenv("CMUS_CHARSET"); data/cmus-2.8.0/worker.c:64:2: [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(time(NULL)); data/cmus-2.8.0/Doc/ttman.c:51:8: [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 tmp_file[1024]; data/cmus-2.8.0/Doc/ttman.c:135:2: [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(s, str, len); data/cmus-2.8.0/Doc/ttman.c:587:2: [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[1024]; data/cmus-2.8.0/Doc/ttman.c:842: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_RDONLY); data/cmus-2.8.0/Doc/ttman.c:872:7: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). fd = mkstemp(tmp_file); data/cmus-2.8.0/ape.c:35: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 const char preamble[PREAMBLE_SIZE] = { 'A', 'P', 'E', 'T', 'A', 'G', 'E', 'X' }; data/cmus-2.8.0/ape.c:43:2: [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[4096]; data/cmus-2.8.0/ape.c:91:2: [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[HEADER_SIZE]; data/cmus-2.8.0/browser.c:98:2: [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(full, path, l1); data/cmus-2.8.0/browser.c:100:2: [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(full + l1 + 1, name, l2 + 1); data/cmus-2.8.0/browser.c:126:2: [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(e->name, line, name_size); data/cmus-2.8.0/browser.c:151:4: [2] (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). Risk is low because the source is a constant string. strcpy(parent_dir_e->name, "../"); data/cmus-2.8.0/browser.c:186:4: [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(e->name, str, len); data/cmus-2.8.0/browser.c:273:2: [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 cwd[1024]; data/cmus-2.8.0/buffer.c:29:2: [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 data[CHUNK_SIZE]; data/cmus-2.8.0/cache.c:53:8: [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 cache_header[8] = "CTC\0\0\0\0\0"; data/cmus-2.8.0/cache.c:217: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(cache_filename, O_RDONLY); data/cmus-2.8.0/cache.c:383: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(tmp, O_WRONLY | O_CREAT | O_TRUNC, 0666); data/cmus-2.8.0/channelmap.h:83: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. return memcpy(dst, src, sizeof(*dst) * CHANNELS_MAX); data/cmus-2.8.0/cmdline.c:109:2: [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(cmdline.line, text, len + 1); data/cmus-2.8.0/cmus.c:229:8: [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_CREAT | O_WRONLY | O_TRUNC, 0666); data/cmus-2.8.0/command_mode.c:438: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 buf[OPTION_MAX_SIZE]; data/cmus-2.8.0/command_mode.c:767:2: [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 filename[512]; data/cmus-2.8.0/command_mode.c:1371:2: [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[4096]; data/cmus-2.8.0/command_mode.c:2011:8: [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 expbuf[512]; data/cmus-2.8.0/command_mode.c:2408:6: [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[OPTION_MAX_SIZE]; data/cmus-2.8.0/convert.c:92:2: [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(*outbuf, inbuf, inbuf_size); data/cmus-2.8.0/cue.c:153:2: [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(s, start, len); data/cmus-2.8.0/cue_utils.c:31:2: [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[4096] = {0}; data/cmus-2.8.0/cue_utils.c:43:7: [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(buf, "r"); data/cmus-2.8.0/cue_utils.c:66:2: [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[4096] = {0}; data/cmus-2.8.0/debug.c:34:2: [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 filename[512]; data/cmus-2.8.0/debug.c:44:17: [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). debug_stream = fopen(filename, "w"); data/cmus-2.8.0/discid.c:83:2: [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[256]; data/cmus-2.8.0/editable.h:38:2: [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 sort_str[128]; data/cmus-2.8.0/expr.c:74: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 const char specials[NR_SPECIALS] = "!<>=&|()"; data/cmus-2.8.0/expr.c:80: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 const char * const op_names[NR_OPS] = { "<", "<=", "=", ">=", ">", "!=" }; data/cmus-2.8.0/expr.c:81: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 const char * const expr_names[NR_EXPRS] = { data/cmus-2.8.0/expr.c:85:8: [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 error_buf[64] = { 0, }; data/cmus-2.8.0/expr.c:119:2: [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(tok->str, str + s, e - s); data/cmus-2.8.0/expr.c:158:2: [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(tok->str, str + s, e - s); data/cmus-2.8.0/file.c:79: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_RDONLY); data/cmus-2.8.0/file.c:127: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(line, buf + pos, len); data/cmus-2.8.0/file.c:159: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(line, buf + pos, len); data/cmus-2.8.0/filters.c:123:2: [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[512]; data/cmus-2.8.0/filters.c:215:2: [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[64]; data/cmus-2.8.0/filters.c:241: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(buf, str + s, len); data/cmus-2.8.0/format_print.c:77:2: [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 stack[20]; data/cmus-2.8.0/format_print.c:110:2: [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 stack[DBL_MAX_LEN], b[DBL_MAX_LEN]; data/cmus-2.8.0/format_print.c:125:2: [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 stack[32]; data/cmus-2.8.0/format_print.c:291:2: [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[OPTION_MAX_SIZE]; data/cmus-2.8.0/gbuf.c:27: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 gbuf_empty_buffer[1]; data/cmus-2.8.0/gbuf.c:68:2: [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(buf->buffer + buf->len, data, len); data/cmus-2.8.0/gbuf.c:80:2: [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(buf->buffer + buf->len, str, len + 1); data/cmus-2.8.0/help.c:210:2: [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[OPTION_MAX_SIZE]; data/cmus-2.8.0/history.c:86:2: [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 filename_tmp[512]; data/cmus-2.8.0/history.c:92: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_tmp, O_CREAT | O_WRONLY | O_TRUNC, 0666); data/cmus-2.8.0/http.c:148:2: [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 port[16]; data/cmus-2.8.0/http.c:167:2: [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(&addr.sa, result->ai_addr, result->ai_addrlen); data/cmus-2.8.0/http.c:456: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. static const char t[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; data/cmus-2.8.0/id3.c:68:2: [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 id[4]; data/cmus-2.8.0/id3.c:85: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 const char *genres[NR_GENRES] = { data/cmus-2.8.0/id3.c:239:7: [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 * const id3_key_names[NUM_ID3_KEYS] = { data/cmus-2.8.0/id3.c:544:8: [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 name[8]; data/cmus-2.8.0/id3.c:975:2: [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(ufid, buf + len - ufid_len, ufid_len); data/cmus-2.8.0/id3.c:1165: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 buf[138]; data/cmus-2.8.0/id3.c:1187:6: [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(id3->v1, buf + 10, 128); data/cmus-2.8.0/id3.c:1229:2: [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 in[32]; data/cmus-2.8.0/id3.c:1239:2: [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(in, buf, i + 1); data/cmus-2.8.0/id3.h:62:2: [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 v1[128]; data/cmus-2.8.0/id3.h:63:2: [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 *v2[NUM_ID3_KEYS]; data/cmus-2.8.0/id3.h:69: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. extern const char * const id3_key_names[NUM_ID3_KEYS]; data/cmus-2.8.0/input.c:56: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). unsigned int open : 1; data/cmus-2.8.0/input.c:186:2: [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[256]; data/cmus-2.8.0/input.c:457:16: [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). ip->data.fd = open(ip->data.filename, O_RDONLY); data/cmus-2.8.0/input.c:463: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). rc = ip->ops->open(&ip->data); data/cmus-2.8.0/input.c:507: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 filename[256]; data/cmus-2.8.0/input.c:574:10: [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 (ip->open) data/cmus-2.8.0/input.c:584:13: [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). BUG_ON(ip->open); data/cmus-2.8.0/input.c:590: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). rc = ip->ops->open(&ip->data); data/cmus-2.8.0/input.c:594:28: [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). rc = ip->ops ? ip->ops->open(&ip->data) : 1; data/cmus-2.8.0/input.c:597:28: [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). rc = ip->ops ? ip->ops->open(&ip->data) : 1; data/cmus-2.8.0/input.c:663:2: [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[8 * 1024]; data/cmus-2.8.0/input.c:808: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). BUG_ON(!ip->open); data/cmus-2.8.0/input.c:814: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). BUG_ON(!ip->open); data/cmus-2.8.0/input.c:825: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). BUG_ON(!ip->open); data/cmus-2.8.0/input.c:838: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). BUG_ON(!ip->open); data/cmus-2.8.0/input.c:845: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). BUG_ON(!ip->open); data/cmus-2.8.0/input.c:921:2: [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[64]; data/cmus-2.8.0/input.c:939:2: [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 buffer[1024]; data/cmus-2.8.0/ip.h:89:8: [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 (*open)(struct input_plugin_data *ip_data); data/cmus-2.8.0/ip/aac.c:40:2: [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 rbuf[BUFFER_SIZE]; data/cmus-2.8.0/ip/aac.c:122:46: [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 inline int parse_frame(const unsigned char data[6]) data/cmus-2.8.0/ip/aac.c:352: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(buffer, sample_buf, count); data/cmus-2.8.0/ip/aac.c:355: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(buffer, sample_buf, bytes); data/cmus-2.8.0/ip/aac.c:372: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(buffer, priv->overflow_buf, len); data/cmus-2.8.0/ip/aac.c:396: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(ip_data->filename, O_RDONLY); data/cmus-2.8.0/ip/cdio.c:79:2: [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 read_buf[CDIO_CD_FRAMESIZE_RAW]; data/cmus-2.8.0/ip/cdio.c:126:16: [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). ip_data->fd = open(device, O_RDONLY); data/cmus-2.8.0/ip/cdio.c:253: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(buffer, priv->read_buf + priv->buf_used, rc); data/cmus-2.8.0/ip/cdio.c:258:4: [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(buffer, priv->read_buf + priv->buf_used, buf_left); data/cmus-2.8.0/ip/cdio.c:261:4: [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(buffer, priv->read_buf + priv->buf_used, count); data/cmus-2.8.0/ip/cdio.c:364:2: [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[64]; data/cmus-2.8.0/ip/cdio.c:444:5: [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(buf, "%u", year); data/cmus-2.8.0/ip/cdio.c:463:2: [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(buf, "%02d", priv->track); data/cmus-2.8.0/ip/cue.c:71:2: [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[4096] = {0}; data/cmus-2.8.0/ip/cue.c:135:16: [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). ip_data->fd = open(ip_get_filename(priv->child), O_RDONLY); data/cmus-2.8.0/ip/cue.c:227:2: [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[32] = { 0 }; data/cmus-2.8.0/ip/ffmpeg.c:307:4: [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(avpkt.data, input->curr_pkt_buf, input->curr_pkt_size); data/cmus-2.8.0/ip/ffmpeg.c:359:2: [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(buffer, output->buffer_pos, out_size); data/cmus-2.8.0/ip/flac.c:184:4: [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(dest, &src, bits / 8); data/cmus-2.8.0/ip/flac.c:398:2: [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(buffer, priv->buf + priv->buf_rpos, count); data/cmus-2.8.0/ip/mad.c:130: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(ip_data->filename, O_RDONLY); data/cmus-2.8.0/ip/mad.c:178: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 buf[64]; data/cmus-2.8.0/ip/mad.c:181:4: [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(buf, "%f", lame->peak); data/cmus-2.8.0/ip/mad.c:184:3: [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(buf, "%+.1f dB", lame->trackGain); data/cmus-2.8.0/ip/mad.c:251: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/cmus-2.8.0/ip/mad.c:255:5: [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(buf, "VBR V%d", v); data/cmus-2.8.0/ip/mp4.c:319: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(buffer, sample_buf, count); data/cmus-2.8.0/ip/mp4.c:322: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(buffer, sample_buf, bytes); data/cmus-2.8.0/ip/mp4.c:342: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(buffer, priv->overflow_buf, len); data/cmus-2.8.0/ip/mp4.c:430: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(xstr, ustr, size); data/cmus-2.8.0/ip/mp4.c:437: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 buf[6]; data/cmus-2.8.0/ip/mp4.c:442: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 buf[6]; data/cmus-2.8.0/ip/mp4.c:479: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 buf[6]; data/cmus-2.8.0/ip/mp4.c:484: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 buf[6]; data/cmus-2.8.0/ip/mpc.c:314: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. static char buf[16]; data/cmus-2.8.0/ip/mpc.c:317:2: [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(buf, "%.2f", g); data/cmus-2.8.0/ip/mpc.c:326:2: [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(buf, "%d.%02d", a, b); data/cmus-2.8.0/ip/mpc.c:333: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. static char buf[16]; data/cmus-2.8.0/ip/mpc.c:335:2: [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(buf, "%.5f", peak / 256.f / 100.f); data/cmus-2.8.0/ip/mpc.c:337:2: [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(buf, "%d.%05d", peak / 32767, peak % 32767); data/cmus-2.8.0/ip/nomad.c:65:11: [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 input_buffer[INPUT_BUFFER_SIZE + MAD_BUFFER_GUARD]; data/cmus-2.8.0/ip/nomad.h:48:11: [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 toc[100]; data/cmus-2.8.0/ip/nomad.h:52:2: [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 encoder[10]; /* 9 byte encoder name/version ("LAME3.97b") */ data/cmus-2.8.0/ip/vorbis.c:372:2: [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[64]; data/cmus-2.8.0/ip/vorbis.c:378:3: [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(buf, "%ldkbps", b / 1000); data/cmus-2.8.0/ip/vorbis.c:391:3: [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(buf, "q%g", roundf(q * 100.f) / 100.f); data/cmus-2.8.0/ip/vtx.c:132: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 buf[16] = {0}; data/cmus-2.8.0/ip/wav.c:53:2: [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[8]; data/cmus-2.8.0/ip/wav.c:68:2: [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[4]; data/cmus-2.8.0/ip/wav.c:97:2: [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[4]; data/cmus-2.8.0/ip/wav.c:307:2: [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 id[4+1]; data/cmus-2.8.0/ip/wav.c:326:4: [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[4]; data/cmus-2.8.0/ip/wav.c:386:2: [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/cmus-2.8.0/ip/wavpack.c:165:2: [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 msg[80]; data/cmus-2.8.0/ip/wavpack.c:185: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). priv->wvc_file.fd = open(filename_wvc, O_RDONLY); data/cmus-2.8.0/ip/wavpack.c:301: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(ip_data->filename, O_RDONLY); data/cmus-2.8.0/ip/wavpack.c:386:2: [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[32]; data/cmus-2.8.0/ip/wavpack.c:391:3: [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(buf, "fast"); data/cmus-2.8.0/ip/wavpack.c:394:3: [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(buf, "very high"); data/cmus-2.8.0/ip/wavpack.c:397:3: [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(buf, "high"); data/cmus-2.8.0/ip/wavpack.c:399:3: [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(buf, "normal"); data/cmus-2.8.0/ip/wavpack.c:402:3: [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(buf, " hybrid"); data/cmus-2.8.0/job.c:290:4: [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[1024]; data/cmus-2.8.0/job.c:310: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(ent->name, name, size); data/cmus-2.8.0/job.c:329:4: [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(dir.path + dir.len, ents[i]->name, len + 1); data/cmus-2.8.0/keys.c:33:7: [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 * const key_context_names[NR_CTXS + 1] = { data/cmus-2.8.0/keys.c:519:2: [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(b->cmd, cmd, size); data/cmus-2.8.0/keys.h:62: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. extern const char * const key_context_names[NR_CTXS + 1]; data/cmus-2.8.0/load_dir.c:41:2: [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(dir->path, name, len); data/cmus-2.8.0/load_dir.c:78: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(full + len, name, nlen + 1); data/cmus-2.8.0/load_dir.h:33:2: [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 path[1024]; data/cmus-2.8.0/main.c:45:2: [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[8192]; data/cmus-2.8.0/main.c:87:2: [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[512]; data/cmus-2.8.0/main.c:135: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(&addr.sa, result->ai_addr, result->ai_addrlen); data/cmus-2.8.0/main.c:366: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 line[512]; data/cmus-2.8.0/misc.c:362:2: [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[size]; data/cmus-2.8.0/misc.c:367: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(tmp, arr + j * size, size); data/cmus-2.8.0/misc.c:368: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(arr + j * size, arr + i * size, size); data/cmus-2.8.0/misc.c:369: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(arr + i * size, tmp, size); data/cmus-2.8.0/mixer.h:31:8: [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 (*open)(int *volume_max); data/cmus-2.8.0/op.h:55:8: [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 (*open)(sample_format_t sf, const channel_position_t *channel_map); data/cmus-2.8.0/op/ao.c:89:2: [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[256] = ""; data/cmus-2.8.0/op/ao.c:106:4: [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(buf, "M,"); data/cmus-2.8.0/op/ao.c:139: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 file[512]; data/cmus-2.8.0/op/coreaudio.c:210: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(data1, data, size1); data/cmus-2.8.0/op/coreaudio.c:212: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(data2, data, size2); data/cmus-2.8.0/op/coreaudio.c:214: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(data1, data, size1); data/cmus-2.8.0/op/coreaudio.c:226: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(data, data1, size1); data/cmus-2.8.0/op/coreaudio.c:228: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(data, data2, size2); data/cmus-2.8.0/op/coreaudio.c:230: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(data, data1, size1); data/cmus-2.8.0/op/coreaudio.c:328: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 name[256] = {0}; data/cmus-2.8.0/op/jack.c:310: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 port_name[20]; data/cmus-2.8.0/op/mixer_oss.c:69:8: [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 mixer_channels[OSS_MIXER_CHANNEL_MAX]; data/cmus-2.8.0/op/mixer_oss.c:79:13: [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). mixer_fd = open(device, O_RDWR); data/cmus-2.8.0/op/mixer_sun.c:58:13: [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). mixer_fd = open(dev, O_RDWR); data/cmus-2.8.0/op/oss.c:204:11: [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). oss_fd = open(oss_dsp_device, O_WRONLY); data/cmus-2.8.0/op/sun.c:147:11: [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). sun_fd = open(sun_audio_device, O_WRONLY); data/cmus-2.8.0/op/waveout.c:194: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(hdr->lpData, buffer + written, len); data/cmus-2.8.0/options.c:436:2: [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 buffer[OPTION_MAX_SIZE]; data/cmus-2.8.0/options.c:564:7: [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 * const view_names[NR_VIEWS + 1] = { data/cmus-2.8.0/options.c:1136: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 const char * const color_enum_names[1 + 8 * 2 + 1] = { data/cmus-2.8.0/options.c:1371: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 const char * const color_names[NR_COLORS] = { data/cmus-2.8.0/options.c:1399: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 const char * const attr_names[NR_ATTRS] = { data/cmus-2.8.0/options.c:1508:2: [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 filename[512]; data/cmus-2.8.0/options.c:1543:2: [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 filename_tmp[512]; data/cmus-2.8.0/options.c:1544:2: [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 filename[512]; data/cmus-2.8.0/options.c:1549:6: [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). f = fopen(filename_tmp, "w"); data/cmus-2.8.0/options.c:1557: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 buf[OPTION_MAX_SIZE]; data/cmus-2.8.0/options.c:1650:2: [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 filename[512]; data/cmus-2.8.0/options.c:1708:2: [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 filename_tmp[512]; data/cmus-2.8.0/options.c:1709:2: [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 filename[512]; data/cmus-2.8.0/options.c:1715:6: [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). f = fopen(filename_tmp, "w"); data/cmus-2.8.0/options.h:153: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. extern const char * const view_names[NR_VIEWS + 1]; data/cmus-2.8.0/output.c:94: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 filename[256]; data/cmus-2.8.0/output.c:207:23: [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). rc = op->mixer_ops->open(&volume_max); data/cmus-2.8.0/output.c:249:20: [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). rc = o->pcm_ops->open(sf, NULL); data/cmus-2.8.0/output.c:262: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). return op->pcm_ops->open(sf, channel_map); data/cmus-2.8.0/output.c:408:2: [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[64]; data/cmus-2.8.0/output.c:428:2: [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 buffer[1024]; data/cmus-2.8.0/path.c:129: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(str, cwd, cwd_len); data/cmus-2.8.0/path.c:131: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(str + cwd_len + 1, src, src_len + 1); data/cmus-2.8.0/path.c:139:2: [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 cwd[1024]; data/cmus-2.8.0/pl.c:535:3: [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(name + file_len, ".%d", i); data/cmus-2.8.0/player.c:62: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 player_metadata[255 * 16 + 1]; data/cmus-2.8.0/player.c:262:46: [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. return b[0] | (b[1] << 8) | (((const signed char *) buf)[2] << 16); data/cmus-2.8.0/player.c:437: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(player_metadata, ip_get_metadata(ip), 255 * 16 + 1); data/cmus-2.8.0/player.c:470:2: [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 buffer[1024]; data/cmus-2.8.0/player.c:487:2: [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 buffer[1024]; data/cmus-2.8.0/player.h:74:8: [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. extern char player_metadata[255 * 16 + 1]; data/cmus-2.8.0/search_mode.c:57:2: [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(ptr, text, len + 1); data/cmus-2.8.0/server.c:85:2: [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 optbuf[OPTION_MAX_SIZE]; data/cmus-2.8.0/server.c:186:2: [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[512]; data/cmus-2.8.0/server.c:198:2: [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[1024]; data/cmus-2.8.0/server.c:361: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(&addr.sa, result->ai_addr, result->ai_addrlen); data/cmus-2.8.0/spawn.c:64: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). dev_null = open("/dev/null", O_WRONLY); data/cmus-2.8.0/tabexp_file.c:47:2: [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(home, passwd->pw_dir, len); data/cmus-2.8.0/tabexp_file.c:110:4: [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(str, name, len); data/cmus-2.8.0/tabexp_file.c:149:2: [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 cwd[1024]; data/cmus-2.8.0/track_info.c:329: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 buf[32]; data/cmus-2.8.0/track_info.c:345: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(buf, s, len); data/cmus-2.8.0/track_info.c:390: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(buf + pos, key, len); data/cmus-2.8.0/u_collate.c:115: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(result + 1, str, xfrm_len); data/cmus-2.8.0/uchar.c:34:7: [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 hex_tab[16] = "0123456789abcdef"; data/cmus-2.8.0/uchar.c:50:21: [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 signed char len_tab[256] = { data/cmus-2.8.0/uchar.c:85: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 const char utf8_skip_data[256] = { data/cmus-2.8.0/uchar.c:562: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 buf[4]; data/cmus-2.8.0/uchar.h:26: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. extern const char hex_tab[16]; data/cmus-2.8.0/ui_curses.c:113:8: [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 error_buf[512]; data/cmus-2.8.0/ui_curses.c:121:8: [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 print_buffer[1024]; data/cmus-2.8.0/ui_curses.c:124:8: [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 conv_buffer[512]; data/cmus-2.8.0/ui_curses.c:132:8: [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 tcap_buffer[64]; data/cmus-2.8.0/ui_curses.c:180:17: [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 unsigned char cursed_to_bg_idx[NR_CURSED] = { data/cmus-2.8.0/ui_curses.c:204:17: [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 unsigned char cursed_to_fg_idx[NR_CURSED] = { data/cmus-2.8.0/ui_curses.c:228:17: [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 unsigned char cursed_to_attr_idx[NR_CURSED] = { data/cmus-2.8.0/ui_curses.c:530: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(print_buffer + 1, str, len - 3); data/cmus-2.8.0/ui_curses.c:535: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(print_buffer + 1, str, l); data/cmus-2.8.0/ui_curses.c:890:2: [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[256]; data/cmus-2.8.0/ui_curses.c:899:8: [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 stat_chars[3] = " *!"; data/cmus-2.8.0/ui_curses.c:939:2: [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[OPTION_MAX_SIZE]; data/cmus-2.8.0/ui_curses.c:1022:2: [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 title[512]; data/cmus-2.8.0/ui_curses.c:1060:2: [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 title[512]; data/cmus-2.8.0/ui_curses.c:1080: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. static char buf[256]; data/cmus-2.8.0/ui_curses.c:1093: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 const char * const sorted_names[2] = { "", "sorted by " }; data/cmus-2.8.0/ui_curses.c:1097:2: [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[512]; data/cmus-2.8.0/ui_curses.c:1139:2: [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 title[512]; data/cmus-2.8.0/ui_curses.c:1477: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. static char stream_title[255 * 16 + 1]; data/cmus-2.8.0/ui_curses.c:1487:4: [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(stream_title, title, ptr - title); data/cmus-2.8.0/ui_curses.c:1548: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 buf[512]; data/cmus-2.8.0/ui_curses.c:1579:2: [2] (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). Risk is low because the source is a constant string. strcpy(error_buf, "Error: "); data/cmus-2.8.0/ui_curses.c:1604:2: [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 buffer[512]; data/cmus-2.8.0/ui_curses.c:1801:2: [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 *argv[32]; data/cmus-2.8.0/ui_curses.c:1849: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[32]; data/cmus-2.8.0/ui_curses.c:2387: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 buf[16]; data/cmus-2.8.0/utils.h:293:16: [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 devnull = open("/dev/null", O_WRONLY); data/cmus-2.8.0/utils.h:329:2: [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[128]; data/cmus-2.8.0/xmalloc.c:43:2: [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(s, str, len); data/cmus-2.8.0/xmalloc.h:72:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return (char *) memcpy(ptr, str, size); data/cmus-2.8.0/xstrjoin.c:38: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(joined + pos, str[i], lens[i]); data/cmus-2.8.0/ape.c:52:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int i, got = read(fd, buf, sizeof(buf)); data/cmus-2.8.0/ape.c:197:8: [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(val) > 4) data/cmus-2.8.0/browser.c:93:7: [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). l1 = strlen(path); data/cmus-2.8.0/browser.c:94:7: [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). l2 = strlen(name); data/cmus-2.8.0/browser.c:123:18: [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). int name_size = strlen(line) + 1; data/cmus-2.8.0/browser.c:183: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). len = strlen(str); data/cmus-2.8.0/browser.c:332:8: [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(ptr); data/cmus-2.8.0/browser.c:376:8: [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(new); data/cmus-2.8.0/browser.c:399:8: [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(e->name); data/cmus-2.8.0/browser.c:445:8: [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(e->name); data/cmus-2.8.0/cache.c:147:8: [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). pos = strlen(strings) + 1; data/cmus-2.8.0/cache.c:149:9: [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). pos += strlen(strings + pos) + 1; data/cmus-2.8.0/cache.c:151:9: [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). pos += strlen(strings + pos) + 1; data/cmus-2.8.0/cache.c:156: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). size = strlen(strings + pos) + 1; data/cmus-2.8.0/cache.c:160: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). size = strlen(strings + pos) + 1; data/cmus-2.8.0/cache.c:337:15: [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[count] = strlen(ti->filename) + 1; data/cmus-2.8.0/cache.c:339: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). len[count] = (ti->codec ? strlen(ti->codec) : 0) + 1; data/cmus-2.8.0/cache.c:341: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). len[count] = (ti->codec_profile ? strlen(ti->codec_profile) : 0) + 1; data/cmus-2.8.0/cache.c:348: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). len[count] = strlen(kv[i].key) + 1; data/cmus-2.8.0/cache.c:350: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). len[count] = strlen(kv[i].val) + 1; data/cmus-2.8.0/cmdline.c:102: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). int len = strlen(text); data/cmus-2.8.0/cmdline.c:130: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). cmdline.blen = strlen(cmdline.line); data/cmus-2.8.0/cmus.c:208: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). rc = write_all(fd, ti->filename, strlen(ti->filename)); data/cmus-2.8.0/command_mode.c:2125: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). int pos, i, len = strlen(str); data/cmus-2.8.0/command_mode.c:2220:13: [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). int len = strlen(ks); data/cmus-2.8.0/command_mode.c:2325:8: [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(ks); data/cmus-2.8.0/command_mode.c:2350: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). str_len = strlen(str); data/cmus-2.8.0/command_mode.c:2378:27: [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 *line = xnew(char, strlen(e->name) + strlen(e->filter) + 2); data/cmus-2.8.0/command_mode.c:2378:45: [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 *line = xnew(char, strlen(e->name) + strlen(e->filter) + 2); data/cmus-2.8.0/command_mode.c:2380:27: [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 (!strncmp(str, line, strlen(str))) data/cmus-2.8.0/command_mode.c:2381:41: [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). ptr_array_add(&array, xstrdup(line + strlen(str))); data/cmus-2.8.0/command_mode.c:2399:8: [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(str); data/cmus-2.8.0/command_mode.c:2461:8: [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(str); data/cmus-2.8.0/command_mode.c:2482: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). int len = strlen(str); data/cmus-2.8.0/command_mode.c:2622:8: [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(str); data/cmus-2.8.0/command_mode.c:2746:8: [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). l1 = strlen(tmp); data/cmus-2.8.0/command_mode.c:2747:8: [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). l2 = strlen(s2); data/cmus-2.8.0/command_mode.c:2831: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). int cmd_len = strlen(cmd); data/cmus-2.8.0/convert.c:48: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). inbuf_size = strlen(inbuf); data/cmus-2.8.0/convert.c:90: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). inbuf_size = strlen(inbuf); data/cmus-2.8.0/convert.c:103:15: [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). inbuf_size = strlen(inbuf); data/cmus-2.8.0/cue.c:276: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). if (cue_str_eq(start, len, s->cmd, strlen(s->cmd))) { data/cmus-2.8.0/expr.c:518: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). size_t len_expr_short = strlen(expr_short); data/cmus-2.8.0/expr.c:594:9: [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). k += strlen(key); data/cmus-2.8.0/expr.c:643:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(out+k, num, i_num); data/cmus-2.8.0/expr.c:659: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). k += strlen(key); data/cmus-2.8.0/expr.c:662:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(out+k, num, i_num); data/cmus-2.8.0/file.c:38:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, buffer + pos, count - pos); data/cmus-2.8.0/format_print.c:235:15: [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 a && (strlen(a) == b_len) && (memcmp(a, b, b_len) == 0); data/cmus-2.8.0/format_print.c:241: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). char ch = strlen(key) == 1 ? *key : 0; data/cmus-2.8.0/format_print.c:243:60: [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 ((ch != 0 && fo->ch == ch) || strnequal(fo->str, key, strlen(key))) { data/cmus-2.8.0/format_print.c:364: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). if (strcmp(buf, "false") != 0 && strlen(buf) != 0) data/cmus-2.8.0/format_print.c:568:41: [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). format_parse(str_width, format, fopts, strlen(format)); data/cmus-2.8.0/format_print.c:656:13: [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). buf->len = strlen(buf->buffer); data/cmus-2.8.0/format_print.c:747:41: [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 format_valid_sub(format, fopts, strlen(format)); data/cmus-2.8.0/gbuf.c:75: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). int len = strlen(str); data/cmus-2.8.0/glob.c:198: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). text += strlen(gitem->text); data/cmus-2.8.0/glob.c:225: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). tlen = strlen(t); data/cmus-2.8.0/help.c:233: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). size_t len = strlen(buf); data/cmus-2.8.0/history.c:101:39: [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). rc = write(fd, history_entry->text, strlen(history_entry->text)); data/cmus-2.8.0/history.c:170:15: [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). search_len = strlen(text); data/cmus-2.8.0/history.c:192:15: [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). search_len = strlen(text); data/cmus-2.8.0/http.c:302:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, &ch, 1); data/cmus-2.8.0/http.c:461: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). str_len = strlen(str); data/cmus-2.8.0/id3.c:746: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). return strlen(buf) + 1; data/cmus-2.8.0/input.c:695:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = ip->ops->read(&ip->data, buf, count); data/cmus-2.8.0/ip.h:91:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int (*read)(struct input_plugin_data *ip_data, char *buffer, int count); data/cmus-2.8.0/ip/bass.c:114:15: [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). ret = malloc(strlen(str) + 1); data/cmus-2.8.0/ip/bass.c:115:27: [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). n = u_to_ascii(ret, str, strlen(str)); data/cmus-2.8.0/ip/cdio.c:86: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). int len = strlen(message); data/cmus-2.8.0/ip/flac.c:76:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(ip_data->fd, buf, *size); data/cmus-2.8.0/ip/mpc.c:440: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). for (i = strlen(s) - 1; s[i] == '\'' && i >= 0; i--) data/cmus-2.8.0/ip/nomad.c:323:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_size = nomad->cbs.read(nomad->datasource, read_start, read_size); data/cmus-2.8.0/ip/nomad.c:606:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). .read = cbs->read, data/cmus-2.8.0/ip/nomad.h:30:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t (*read)(void *datasource, void *buffer, size_t count); data/cmus-2.8.0/ip/wav.c:248:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(ip_data->fd, buffer, count); data/cmus-2.8.0/ip/wavpack.c:70:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(file->fd, ptr, count); data/cmus-2.8.0/ip/wavpack.c:182:29: [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_wvc = xnew(char, strlen(ip_data->filename) + 2); data/cmus-2.8.0/job.c:254:13: [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). int tlen = strlen(target); data/cmus-2.8.0/job.c:255:13: [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). int rlen = strlen(root); data/cmus-2.8.0/job.c:307: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). size = strlen(name) + 1; data/cmus-2.8.0/job.c:327:14: [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). int len = strlen(ents[i]->name); data/cmus-2.8.0/keys.c:514:9: [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(cmd) + 1; data/cmus-2.8.0/load_dir.c:30: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). int len = strlen(name); data/cmus-2.8.0/load_dir.c:70:14: [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). int nlen = strlen(name); data/cmus-2.8.0/main.c:50:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int rc = read(sock, buf, sizeof(buf)); data/cmus-2.8.0/main.c:79: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). if (write_all(sock, line, strlen(line)) == -1) data/cmus-2.8.0/main.c:112:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.un.sun_path, address, sizeof(addr.un.sun_path) - 1); data/cmus-2.8.0/misc.c:100:15: [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 len = strlen(str); data/cmus-2.8.0/misc.c:131: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). size_t need = strlen(str) + 1; data/cmus-2.8.0/mpris.c:172:3: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(buf, "/"); data/cmus-2.8.0/mpris.c:413:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define MPRIS_PROP(name, type, read) \ data/cmus-2.8.0/mpris.c:414:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). SD_BUS_PROPERTY(name, type, read, 0, \ data/cmus-2.8.0/mpris.c:417:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define MPRIS_WPROP(name, type, read, write) \ data/cmus-2.8.0/mpris.c:418:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). SD_BUS_WRITABLE_PROPERTY(name, type, read, write, 0, \ data/cmus-2.8.0/op/ao.c:100:5: [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(buf, ","); data/cmus-2.8.0/op/ao.c:108: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). buf[strlen(buf)-1] = '\0'; data/cmus-2.8.0/op/jack.c:450:3: [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(1000); data/cmus-2.8.0/op/jack.c:593: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). if (strlen(val) != 1) { data/cmus-2.8.0/options.c:398: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). int len = strlen(buf); data/cmus-2.8.0/options.c:1118: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). if (strlen(buf) != 0) { data/cmus-2.8.0/path.c:29: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). ext = filename + strlen(filename) - 1; data/cmus-2.8.0/path.c:126:13: [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). src_len = strlen(src); data/cmus-2.8.0/path.c:127:13: [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). cwd_len = strlen(cwd); data/cmus-2.8.0/pl.c:525: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). size_t file_len = strlen(file); data/cmus-2.8.0/prog.c:95:8: [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(opt); data/cmus-2.8.0/read_wrapper.c:31:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(ip_data->fd, buffer, count); data/cmus-2.8.0/read_wrapper.c:39:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(ip_data->fd, &byte, 1); data/cmus-2.8.0/read_wrapper.c:61:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(ip_data->fd, buffer, count); data/cmus-2.8.0/search_mode.c:49: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). int len = strlen(text); data/cmus-2.8.0/server.c:153: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). return write_all(client->fd, "\n", strlen("\n")); data/cmus-2.8.0/server.c:164: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). return write_all(client->fd, "\n", strlen("\n")); data/cmus-2.8.0/server.c:193: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). return write_all(fd, buf, strlen(buf)); data/cmus-2.8.0/server.c:206:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(client->fd, buf + pos, sizeof(buf) - pos); data/cmus-2.8.0/server.c:342:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.un.sun_path, address, sizeof(addr.un.sun_path) - 1); data/cmus-2.8.0/tabexp_file.c:45:8: [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(passwd->pw_dir); data/cmus-2.8.0/tabexp_file.c:80:18: [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). int start_len = strlen(start); data/cmus-2.8.0/tabexp_file.c:107:14: [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). int len = strlen(name); data/cmus-2.8.0/track_info.c:385:13: [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). int len = strlen(key); data/cmus-2.8.0/tree.c:505: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). buf = xnew(char, strlen(name_orig) + 2); data/cmus-2.8.0/u_collate.c:112: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). size_t xfrm_len = strlen(str); data/cmus-2.8.0/uchar.c:654: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). int haystack_len = strlen(haystack); data/cmus-2.8.0/ui_curses.c:400:7: [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). is = strlen(i); data/cmus-2.8.0/ui_curses.c:411: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). n = min_i(sizeof(conv_buffer) - 1, strlen(buffer)); data/cmus-2.8.0/ui_curses.c:436:7: [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). is = strlen(i); data/cmus-2.8.0/ui_curses.c:525: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). l = strlen(str); data/cmus-2.8.0/ui_curses.c:751:8: [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). pos = strlen(print_buffer); data/cmus-2.8.0/ui_curses.c:968: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). size_t len = strlen(buf); data/cmus-2.8.0/ui_curses.c:1042: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). size_t prefix_w = strlen(prefix); data/cmus-2.8.0/ui_curses.c:1083:14: [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). home_len = strlen(home_dir); data/cmus-2.8.0/ui_curses.c:1114:9: [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). pos = strlen(buf); data/cmus-2.8.0/ui_curses.c:1117:8: [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). pos = strlen(buf); data/cmus-2.8.0/ui_curses.c:1389:7: [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). i = strlen(print_buffer) - 1; data/cmus-2.8.0/ui_curses.c:1552:13: [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). w = clamp(strlen(buf) + 2, COLS/4, COLS/2); data/cmus-2.8.0/ui_curses.c:1566: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). write_all(client_fd, error_buf, strlen(error_buf)); data/cmus-2.8.0/ui_curses.c:1586: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). write_all(client_fd, error_buf, strlen(error_buf)); data/cmus-2.8.0/utils.h:137:31: [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 strstr(str, suffix) + strlen(suffix) == str + strlen(str); data/cmus-2.8.0/utils.h:137:55: [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 strstr(str, suffix) + strlen(suffix) == str + strlen(str); data/cmus-2.8.0/utils.h:142: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). char *end = str + strlen(str); data/cmus-2.8.0/utils.h:331:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pipe, buf, bytes_to_read); data/cmus-2.8.0/xmalloc.h:70: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). size_t size = strlen(str) + 1; data/cmus-2.8.0/xstrjoin.c:32:13: [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). lens[i] = strlen(str[i]); ANALYSIS SUMMARY: Hits = 470 Lines analyzed = 50381 in approximately 1.18 seconds (42675 lines/second) Physical Source Lines of Code (SLOC) = 38117 Hits@level = [0] 136 [1] 142 [2] 270 [3] 16 [4] 41 [5] 1 Hits@level+ = [0+] 606 [1+] 470 [2+] 328 [3+] 58 [4+] 42 [5+] 1 Hits/KSLOC@level+ = [0+] 15.8984 [1+] 12.3305 [2+] 8.60508 [3+] 1.52163 [4+] 1.10187 [5+] 0.026235 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.