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/jamin-0.98.9~git20170111~199091~repack1/acconfig.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/geq.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/stereo.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/scenes.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/support.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/gtkmeterscale.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/multiout-ui.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/help.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/interface.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/help.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/plugin.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/stereo.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/support.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/compressor.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/preferences.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/io-menu.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/gtkmeter.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/ladspa.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/ringbuffer.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/limiter-ui.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/jackstatus.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/compressor-ui.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/resource.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/plugin.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/process.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/state.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/presets-ui.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/geq.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/scenes.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/debug.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/resource.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/denormal-kill.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/status-ui.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/db.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/gtkmeter.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/intrim.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/callbacks.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/presets-ui.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/status-ui.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/hdeq.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/io.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/ringbuffer.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/main.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/transport.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/spectrum.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/rms.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/multiout-ui.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/hdeq.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/io.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/callbacks_help.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/limiter-ui.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/gtkmeterscale.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/transport.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/intrim.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/interface.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/preferences.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/jamin-scene.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/spectrum.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/process.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/main.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/callbacks.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/rms.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/spline.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/limiter.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/constants.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/io-menu.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/biquad.h Examining data/jamin-0.98.9~git20170111~199091~repack1/src/compressor-ui.c Examining data/jamin-0.98.9~git20170111~199091~repack1/src/state.c FINAL RESULTS: data/jamin-0.98.9~git20170111~199091~repack1/src/callbacks.c:2413: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 (scene_name_text, gtk_entry_get_text (l_scene_name_entry)); data/jamin-0.98.9~git20170111~199091~repack1/src/io-menu.c:85:5: [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), fmt, ap); data/jamin-0.98.9~git20170111~199091~repack1/src/io.c:188: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(tr_buf[tr_next].message, TR_MSGSIZE, fmt, ap); data/jamin-0.98.9~git20170111~199091~repack1/src/io.c:231:5: [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), fmt, ap); data/jamin-0.98.9~git20170111~199091~repack1/src/main.c:90:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(PACKAGE " " VERSION "\n"); data/jamin-0.98.9~git20170111~199091~repack1/src/preferences.c:175:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (file, jamin_dir); data/jamin-0.98.9~git20170111~199091~repack1/src/preferences.c:192:13: [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 (info, (strchr (varin, '=') + 1)); data/jamin-0.98.9~git20170111~199091~repack1/src/preferences.c:474:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (file, jamin_dir); data/jamin-0.98.9~git20170111~199091~repack1/src/scenes.c:311:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (scene_state[menu_scene].description, l_scene_name[menu_scene]); data/jamin-0.98.9~git20170111~199091~repack1/src/scenes.c:390:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (l_scene_name[i], scene_name); data/jamin-0.98.9~git20170111~199091~repack1/src/scenes.c:396:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (scene_state[menu_scene].description, l_scene_name[i]); data/jamin-0.98.9~git20170111~199091~repack1/src/scenes.c:439:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (l_scene_name[menu_scene], g_strdup_printf ("Scene %d", data/jamin-0.98.9~git20170111~199091~repack1/src/scenes.c:459:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (l_scene_name[i], g_strdup_printf("Scene %d", i + 1)); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:1045:5: [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, args); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:1057:5: [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, args); data/jamin-0.98.9~git20170111~199091~repack1/src/io.c:798:19: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, jamin_options)) != -1) { data/jamin-0.98.9~git20170111~199091~repack1/src/main.c:189:22: [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 *home_dir = getenv("HOME"); data/jamin-0.98.9~git20170111~199091~repack1/src/plugin.c:29:6: [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("LADSPA_PATH")) { data/jamin-0.98.9~git20170111~199091~repack1/src/plugin.c:30: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. plugin_path = getenv("LADSPA_PATH"); data/jamin-0.98.9~git20170111~199091~repack1/src/compressor-ui.c:120: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 name[256]; data/jamin-0.98.9~git20170111~199091~repack1/src/geq.c:53: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 name[16]; data/jamin-0.98.9~git20170111~199091~repack1/src/geq.c:64: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, "eqb%d", i+1); data/jamin-0.98.9~git20170111~199091~repack1/src/gtkmeterscale.c:294: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 text[128]; data/jamin-0.98.9~git20170111~199091~repack1/src/intrim.c:137:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[256]; data/jamin-0.98.9~git20170111~199091~repack1/src/intrim.c:170:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[256]; data/jamin-0.98.9~git20170111~199091~repack1/src/intrim.c:221:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[256]; data/jamin-0.98.9~git20170111~199091~repack1/src/intrim.c:228:7: [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(tmp, _("centre")); data/jamin-0.98.9~git20170111~199091~repack1/src/io-menu.c:61: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 *ingroups[MAXGROUPS]; data/jamin-0.98.9~git20170111~199091~repack1/src/io-menu.c: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. static const char *outgroups[MAXGROUPS]; data/jamin-0.98.9~git20170111~199091~repack1/src/io-menu.c:82: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 buffer[300]; data/jamin-0.98.9~git20170111~199091~repack1/src/io.c:103: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 session_file[PATH_MAX]; /* -f option */ data/jamin-0.98.9~git20170111~199091~repack1/src/io.c:148: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 *in_names[NCHANNELS] = {"in_L", "in_R"}; data/jamin-0.98.9~git20170111~199091~repack1/src/io.c:149: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 *out_names[BCHANNELS] = {"a.master.out_L", "a.master.out_R","b.low.out_L", "b.low.out_R", "c.mid.out_L", "c.mid.out_R", "d.high.out_L", "d.high.out_R" }; data/jamin-0.98.9~git20170111~199091~repack1/src/io.c:150: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 *iports[NCHANNELS] = {NULL, NULL}; data/jamin-0.98.9~git20170111~199091~repack1/src/io.c:151: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 *oports[BCHANNELS] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; data/jamin-0.98.9~git20170111~199091~repack1/src/io.c:168:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char message[TR_MSGSIZE]; /* trace message */ data/jamin-0.98.9~git20170111~199091~repack1/src/io.c:228: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 buffer[300]; data/jamin-0.98.9~git20170111~199091~repack1/src/io.c:299:12: [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 *latency_sources[LAT_NSOURCES] = { data/jamin-0.98.9~git20170111~199091~repack1/src/io.c:714:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen (optarg, "r")) == NULL) data/jamin-0.98.9~git20170111~199091~repack1/src/jamin-scene.c:33:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). scene = atoi(argv[1]); data/jamin-0.98.9~git20170111~199091~repack1/src/limiter-ui.c:41: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 limiter_text[2][42] = {"<b>Fast-lookahead-limiter (Harris)</b>", "<b>Foo-limiter (Savolainen)</b>"}; data/jamin-0.98.9~git20170111~199091~repack1/src/limiter-ui.c:110: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 text[256]; data/jamin-0.98.9~git20170111~199091~repack1/src/limiter-ui.c:125: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 text[256]; data/jamin-0.98.9~git20170111~199091~repack1/src/main.c:65: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 user_default_session[PATH_MAX]; /* user's default session name */ data/jamin-0.98.9~git20170111~199091~repack1/src/main.c:219:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(user_default_session, O_RDONLY)) >= 0) { data/jamin-0.98.9~git20170111~199091~repack1/src/plugin.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 path[512]; data/jamin-0.98.9~git20170111~199091~repack1/src/preferences.c:102: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 varin[128], info[128], file[512]; data/jamin-0.98.9~git20170111~199091~repack1/src/preferences.c:176:7: [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 (file, "jamin-defaults"); data/jamin-0.98.9~git20170111~199091~repack1/src/preferences.c:183:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen (file, "r")) != NULL) data/jamin-0.98.9~git20170111~199091~repack1/src/preferences.c:468: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/jamin-0.98.9~git20170111~199091~repack1/src/preferences.c:475:7: [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 (file, "jamin-defaults"); data/jamin-0.98.9~git20170111~199091~repack1/src/preferences.c:482:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen (file, "w")) != NULL) data/jamin-0.98.9~git20170111~199091~repack1/src/resource.c:48: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 rcfile[PATH_MAX]; data/jamin-0.98.9~git20170111~199091~repack1/src/resource.c:53:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(rcfile, O_RDONLY)) >= 0) { data/jamin-0.98.9~git20170111~199091~repack1/src/ringbuffer.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 (dest, &(rb->buf[rb->read_ptr]), n1); data/jamin-0.98.9~git20170111~199091~repack1/src/ringbuffer.c:164:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dest + n1, &(rb->buf[rb->read_ptr]), n2); data/jamin-0.98.9~git20170111~199091~repack1/src/ringbuffer.c:199: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 (&(rb->buf[rb->write_ptr]), src, n1); data/jamin-0.98.9~git20170111~199091~repack1/src/ringbuffer.c:204:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&(rb->buf[rb->write_ptr]), src + n1, n2); data/jamin-0.98.9~git20170111~199091~repack1/src/scenes.c:55: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 l_scene_name[NUM_SCENES][100]; data/jamin-0.98.9~git20170111~199091~repack1/src/scenes.c:87:9: [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, "scene%d", i + 1); data/jamin-0.98.9~git20170111~199091~repack1/src/scenes.c:92:9: [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, "scene%d_eventbox", i + 1); data/jamin-0.98.9~git20170111~199091~repack1/src/scenes.c:308: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. (char *) realloc (scene_state[menu_scene].description, data/jamin-0.98.9~git20170111~199091~repack1/src/scenes.c:393:10: [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 *) realloc (scene_state[i].description, data/jamin-0.98.9~git20170111~199091~repack1/src/spectrum.c:28: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 *band_lbls[BANDS] = { data/jamin-0.98.9~git20170111~199091~repack1/src/spectrum.c:230: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 markup[256]; data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:250:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ns->value, s_value, S_SIZE * sizeof(float)); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:274:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ns->value, state.value, S_SIZE * sizeof(float)); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:510:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[256]; data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:688:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open((const char *) session_filename, O_RDONLY)) >= 0) { data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:863:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gp->scene = atoi(*(p+1)); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:906:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gp->mode = atoi(value); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:922:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gp->comp_bypass[0] = atoi(value); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:924:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gp->comp_bypass[1] = atoi(value); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:926:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gp->comp_bypass[2] = atoi(value); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:928:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gp->limiter_bypass = atoi(value); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:930:48: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gp->out_meter_peak_pref = (gboolean) atoi(value); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:932:48: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gp->rms_meter_peak_pref = (gboolean) atoi(value); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:934:32: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gp->rms_time_slice = atoi(value); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:936:32: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gp->limiter_plugin = atoi(value); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:942:40: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gp->xo_delay_state[XO_LOW] = atoi(value); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:944:40: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gp->xo_delay_state[XO_MID] = atoi(value); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:946:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). gp->iir_xover = atoi(value); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:949:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int ind = index ? atoi(index) : -1; data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:950:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int val = atoi(value); data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:1156:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[256]; data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:1170:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[256]; data/jamin-0.98.9~git20170111~199091~repack1/src/state.c:1184:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[256]; data/jamin-0.98.9~git20170111~199091~repack1/src/state.h:94: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 s_description[S_SIZE] = { data/jamin-0.98.9~git20170111~199091~repack1/src/state.h:371: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 s_symbol[S_SIZE] = { data/jamin-0.98.9~git20170111~199091~repack1/src/io.c:808:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(session_file, optarg, sizeof(session_file)); data/jamin-0.98.9~git20170111~199091~repack1/src/preferences.c:81: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). while( strlen(s)>0 && (s[strlen(s)-1] == '\n' || s[strlen(s)-1] == '\r') ) data/jamin-0.98.9~git20170111~199091~repack1/src/preferences.c:81: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). while( strlen(s)>0 && (s[strlen(s)-1] == '\n' || s[strlen(s)-1] == '\r') ) data/jamin-0.98.9~git20170111~199091~repack1/src/preferences.c:81:54: [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). while( strlen(s)>0 && (s[strlen(s)-1] == '\n' || s[strlen(s)-1] == '\r') ) data/jamin-0.98.9~git20170111~199091~repack1/src/preferences.c:82: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). s[strlen(s)-1] = '\0'; data/jamin-0.98.9~git20170111~199091~repack1/src/preferences.c:84: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). if (s[strlen (s) - 1] == '\n') s[strlen (s) - 1] = 0; data/jamin-0.98.9~git20170111~199091~repack1/src/preferences.c:84: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 (s[strlen (s) - 1] == '\n') s[strlen (s) - 1] = 0; data/jamin-0.98.9~git20170111~199091~repack1/src/scenes.c:309:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen (l_scene_name[menu_scene]) + 1); data/jamin-0.98.9~git20170111~199091~repack1/src/scenes.c:394: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). strlen (l_scene_name[i]) + 1); ANALYSIS SUMMARY: Hits = 98 Lines analyzed = 28221 in approximately 0.73 seconds (38775 lines/second) Physical Source Lines of Code (SLOC) = 19219 Hits@level = [0] 96 [1] 9 [2] 70 [3] 4 [4] 15 [5] 0 Hits@level+ = [0+] 194 [1+] 98 [2+] 89 [3+] 19 [4+] 15 [5+] 0 Hits/KSLOC@level+ = [0+] 10.0942 [1+] 5.09912 [2+] 4.63083 [3+] 0.988605 [4+] 0.780478 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.