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/jack-tools-20131226/c-common/byte-order.c Examining data/jack-tools-20131226/c-common/bessel.c Examining data/jack-tools-20131226/c-common/bessel.h Examining data/jack-tools-20131226/c-common/alsa-seq-endpoint.c Examining data/jack-tools-20131226/c-common/alsa-seq-endpoint.h Examining data/jack-tools-20131226/c-common/alsa-seq-listener.c Examining data/jack-tools-20131226/c-common/alsa-seq-listener.h Examining data/jack-tools-20131226/c-common/alsa-seq-print.c Examining data/jack-tools-20131226/c-common/alsa-seq-print.h Examining data/jack-tools-20131226/c-common/alsa-seq-send.c Examining data/jack-tools-20131226/c-common/alsa-seq-send.h Examining data/jack-tools-20131226/c-common/gen-trapezoid.c Examining data/jack-tools-20131226/c-common/byte-order.h Examining data/jack-tools-20131226/c-common/cfile.c Examining data/jack-tools-20131226/c-common/cfile.h Examining data/jack-tools-20131226/c-common/client.c Examining data/jack-tools-20131226/c-common/client.h Examining data/jack-tools-20131226/c-common/clip.c Examining data/jack-tools-20131226/c-common/clip.h Examining data/jack-tools-20131226/c-common/cq.c Examining data/jack-tools-20131226/c-common/cq.h Examining data/jack-tools-20131226/c-common/failure.h Examining data/jack-tools-20131226/c-common/file.c Examining data/jack-tools-20131226/c-common/file.h Examining data/jack-tools-20131226/c-common/float.h Examining data/jack-tools-20131226/c-common/memory.c Examining data/jack-tools-20131226/c-common/gen-trapezoid.h Examining data/jack-tools-20131226/c-common/gl-sphere.c Examining data/jack-tools-20131226/c-common/gl-cube.c Examining data/jack-tools-20131226/c-common/gl-cube.h Examining data/jack-tools-20131226/c-common/img.c Examining data/jack-tools-20131226/c-common/gl-sphere.h Examining data/jack-tools-20131226/c-common/img-ppm.c Examining data/jack-tools-20131226/c-common/glu-screen-capture.c Examining data/jack-tools-20131226/c-common/glu-screen-capture.h Examining data/jack-tools-20131226/c-common/img-ppm.h Examining data/jack-tools-20131226/c-common/img.h Examining data/jack-tools-20131226/c-common/int.h Examining data/jack-tools-20131226/c-common/jack-transport.c Examining data/jack-tools-20131226/c-common/jack-client.c Examining data/jack-tools-20131226/c-common/jack-client.h Examining data/jack-tools-20131226/c-common/jack-port.c Examining data/jack-tools-20131226/c-common/jack-port.h Examining data/jack-tools-20131226/c-common/signal-interleave.c Examining data/jack-tools-20131226/c-common/jack-ringbuffer.c Examining data/jack-tools-20131226/c-common/jack-ringbuffer.h Examining data/jack-tools-20131226/c-common/jack-transport.h Examining data/jack-tools-20131226/c-common/memory.h Examining data/jack-tools-20131226/c-common/network.c Examining data/jack-tools-20131226/c-common/network.h Examining data/jack-tools-20131226/c-common/observe-signal.c Examining data/jack-tools-20131226/c-common/observe-signal.h Examining data/jack-tools-20131226/c-common/osc.c Examining data/jack-tools-20131226/c-common/osc.h Examining data/jack-tools-20131226/c-common/plane.c Examining data/jack-tools-20131226/c-common/plane.h Examining data/jack-tools-20131226/c-common/print.h Examining data/jack-tools-20131226/c-common/quantize.c Examining data/jack-tools-20131226/c-common/quantize.h Examining data/jack-tools-20131226/c-common/rand.c Examining data/jack-tools-20131226/c-common/rand.h Examining data/jack-tools-20131226/c-common/rgba.c Examining data/jack-tools-20131226/c-common/rgba.h Examining data/jack-tools-20131226/c-common/segment-transfer.c Examining data/jack-tools-20131226/c-common/segment-transfer.h Examining data/jack-tools-20131226/c-common/signal-clip.c Examining data/jack-tools-20131226/c-common/signal-clip.h Examining data/jack-tools-20131226/c-common/signal-copy.c Examining data/jack-tools-20131226/c-common/signal-copy.h Examining data/jack-tools-20131226/c-common/ximg.c Examining data/jack-tools-20131226/c-common/signal-interleave.h Examining data/jack-tools-20131226/c-common/signal-interpolate.c Examining data/jack-tools-20131226/c-common/signal-interpolate.h Examining data/jack-tools-20131226/c-common/signal-print.c Examining data/jack-tools-20131226/c-common/signal-print.h Examining data/jack-tools-20131226/c-common/sound-file.c Examining data/jack-tools-20131226/c-common/sound-file.h Examining data/jack-tools-20131226/c-common/taus88.c Examining data/jack-tools-20131226/c-common/taus88.h Examining data/jack-tools-20131226/c-common/time-current.c Examining data/jack-tools-20131226/c-common/time-current.h Examining data/jack-tools-20131226/c-common/time-ntp.c Examining data/jack-tools-20131226/c-common/time-ntp.h Examining data/jack-tools-20131226/c-common/time-timespec.c Examining data/jack-tools-20131226/c-common/time-timespec.h Examining data/jack-tools-20131226/c-common/time-timeval.c Examining data/jack-tools-20131226/c-common/time-timeval.h Examining data/jack-tools-20131226/c-common/trace.c Examining data/jack-tools-20131226/c-common/trace.h Examining data/jack-tools-20131226/c-common/vector.c Examining data/jack-tools-20131226/c-common/vector.h Examining data/jack-tools-20131226/c-common/window.c Examining data/jack-tools-20131226/c-common/window.h Examining data/jack-tools-20131226/c-common/ximg.h Examining data/jack-tools-20131226/c-common/xregcomp.c Examining data/jack-tools-20131226/c-common/xregcomp.h Examining data/jack-tools-20131226/help/sin.c Examining data/jack-tools-20131226/jack-dl.c Examining data/jack-tools-20131226/jack-dl.h Examining data/jack-tools-20131226/jack-osc.c Examining data/jack-tools-20131226/jack-plumbing.c Examining data/jack-tools-20131226/jack-record.c Examining data/jack-tools-20131226/jack-scope.c Examining data/jack-tools-20131226/jack-transport.c Examining data/jack-tools-20131226/jack-udp.c Examining data/jack-tools-20131226/jack-play.c FINAL RESULTS: data/jack-tools-20131226/c-common/jack-port.c:19:5: [4] (format) snprintf: 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. snprintf(name, 64, output ? "out_%d" : "in_%d", i + 1); data/jack-tools-20131226/c-common/jack-port.c:95:5: [4] (format) snprintf: 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. snprintf(src_name, 64, src, i + k + 1); data/jack-tools-20131226/c-common/jack-port.c:96:5: [4] (format) snprintf: 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. snprintf(dst_name, 64, dst, i + 1); data/jack-tools-20131226/c-common/print.h:6:22: [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 eprintf(...) fprintf(stderr,__VA_ARGS__) data/jack-tools-20131226/c-common/print.h:9:24: [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 dprintf(...) fprintf(stderr,__VA_ARGS__) data/jack-tools-20131226/jack-plumbing.c:72:3: [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, s, ap); data/jack-tools-20131226/jack-plumbing.c:146:13: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. int err = sscanf(s, "(%s \"%[^\"]\" \"%[^\"]\")", data/jack-tools-20131226/jack-plumbing.c:188:3: [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(p->i[p->g], MAX_STR, f, ap); data/jack-tools-20131226/jack-plumbing.c:312: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 (rhs, right); data/jack-tools-20131226/jack-plumbing.c:334: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(rhs, r); data/jack-tools-20131226/jack-record.c:257:7: [4] (format) snprintf: 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. snprintf(name, 512, argv[optind], i); data/jack-tools-20131226/c-common/jack-port.c:103:23: [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 *dst_pattern = getenv(env); data/jack-tools-20131226/c-common/jack-port.c:114:23: [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 *src_pattern = getenv(env); data/jack-tools-20131226/jack-dl.c:159:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while((c = getopt(argc, argv, "b:c:hk:")) != -1) { data/jack-tools-20131226/jack-osc.c:319:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while(( c = getopt(argc, argv, "c:hp:")) != -1) { data/jack-tools-20131226/jack-play.c:338:23: [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 *dst_pattern = getenv("JACK_PLAY_CONNECT_TO"); data/jack-tools-20131226/jack-play.c:380:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while((c = getopt(argc, argv, "b:c:hi:m:n:q:r:tu")) != -1) { data/jack-tools-20131226/jack-plumbing.c:212:44: [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. append_rule_file(p, "%s/.jack-plumbing", getenv("HOME")); data/jack-tools-20131226/jack-plumbing.c:612:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while(( c = getopt(argc, argv, "dhoqu:")) != -1) { data/jack-tools-20131226/jack-record.c:179:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while((c = getopt(argc, argv, "b:f:hm:n:o:p:st:")) != -1) { data/jack-tools-20131226/jack-scope.c:453:15: [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 ((o = getopt (argc, argv, "b:d:e:f:hi:m:n:p:s:u:w:")) != -1) { data/jack-tools-20131226/jack-scope.c:516:15: [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 (!p) p = getenv("JACK_SCOPE_CONNECT_TO"); data/jack-tools-20131226/jack-transport.c:90:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while((c = getopt(argc, argv, "hv")) != -1) { data/jack-tools-20131226/jack-udp.c:234:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while((c = getopt(argc, argv, "b:hn:p:r:c:")) != -1) { data/jack-tools-20131226/c-common/alsa-seq-endpoint.c:77: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 client_name[size]; data/jack-tools-20131226/c-common/alsa-seq-endpoint.c:78: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[size]; data/jack-tools-20131226/c-common/byte-order.c:55: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(buf,&n,size/8); \ data/jack-tools-20131226/c-common/byte-order.c:69: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(&n,buf,size/8); \ data/jack-tools-20131226/c-common/byte-order.c:84: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(dst,&n,size/8); \ data/jack-tools-20131226/c-common/cfile.c:9:16: [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). FILE *fp = fopen(filename, opentype); data/jack-tools-20131226/c-common/client.c:67:7: [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(&(r->c[i].address), &addr, sizeof(addr)); data/jack-tools-20131226/c-common/img-ppm.c:19:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen(name, "w"); data/jack-tools-20131226/c-common/img-ppm.c:47:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen(name, "r"); data/jack-tools-20131226/c-common/img.c:16: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 + n, pixel, 3); data/jack-tools-20131226/c-common/jack-client.c:27: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 uniq[64]; data/jack-tools-20131226/c-common/jack-client.c:40: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 uniq[64]; data/jack-tools-20131226/c-common/jack-port.c:17: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[64]; data/jack-tools-20131226/c-common/jack-port.c:94: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 src_name[64],dst_name[64]; data/jack-tools-20131226/c-common/jack-port.c:105: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 src_pattern[128]; data/jack-tools-20131226/c-common/jack-port.c:116: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 dst_pattern[128]; data/jack-tools-20131226/c-common/osc.c:190:7: [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(p, data[i].s, n + 1); data/jack-tools-20131226/c-common/osc.c:194:7: [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(p, data[i].S, n + 1); data/jack-tools-20131226/c-common/osc.c:207:7: [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(p + 4, data[i].b.data, data[i].b.size); data/jack-tools-20131226/c-common/osc.c:332: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(packet, addr, addr_n); data/jack-tools-20131226/c-common/osc.c:333: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(packet + addr_len, dsc, dsc_n); data/jack-tools-20131226/c-common/signal-copy.c:8: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 ( dst , src + s , ( n - s ) * sizeof(float) ) ; data/jack-tools-20131226/c-common/signal-copy.c:9: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 ( dst + ( n - s ) , src , s * sizeof(float) ) ; data/jack-tools-20131226/c-common/trace.c:7:26: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define TRACE_CPY(r,d,m) memcpy(r,d,m*sizeof(f32)) data/jack-tools-20131226/c-common/ximg.c:12: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 message[128]; data/jack-tools-20131226/c-common/xregcomp.c:10: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 str[64]; data/jack-tools-20131226/jack-dl.h:12: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 cn[64]; /* client name */ data/jack-tools-20131226/jack-osc.c:322:28: [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). d.correct_interval = atoi(optarg); data/jack-tools-20131226/jack-osc.c:329: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). port_n = atoi(optarg); data/jack-tools-20131226/jack-play.c:36: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 client_name[64]; data/jack-tools-20131226/jack-play.c:340: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 src_pattern[128]; data/jack-tools-20131226/jack-plumbing.c:39: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 left[MAX_STR]; data/jack-tools-20131226/jack-plumbing.c:41: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 right[MAX_STR]; data/jack-tools-20131226/jack-plumbing.c:48: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 i[MAX_SETS][MAX_STR]; /* Rule set filenames. */ data/jack-tools-20131226/jack-plumbing.c:145: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 s_command[MAX_STR], s_left[MAX_STR], s_right[MAX_STR]; data/jack-tools-20131226/jack-plumbing.c:162:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen(f, "r"); data/jack-tools-20131226/jack-plumbing.c:167: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 s[MAX_STR]; data/jack-tools-20131226/jack-plumbing.c:318: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(rhs, right, copy_n); data/jack-tools-20131226/jack-plumbing.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(rhs + copy_n, left + a, insert_n); data/jack-tools-20131226/jack-plumbing.c:320: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(rhs + copy_n + insert_n, right + copy_n + 2, after_n); data/jack-tools-20131226/jack-plumbing.c:330: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 rhs[MAX_STR]; data/jack-tools-20131226/jack-plumbing.c:555: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[INOTIFY_BUFLEN]; data/jack-tools-20131226/jack-record.c:229: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 client_name[64] = "jack-record"; data/jack-tools-20131226/jack-record.c:256: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. char name[512]; data/jack-tools-20131226/jack-record.c:286: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 q[128]; data/jack-tools-20131226/jack-scope.c:362: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. char name[256]; data/jack-tools-20131226/jack-scope.c:504: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 nm[64] = "jack-scope"; data/jack-tools-20131226/jack-scope.c:518: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 q[128]; data/jack-tools-20131226/jack-transport.c:43: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 tmp[512]; data/jack-tools-20131226/jack-transport.c:50: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 tmp[512]; data/jack-tools-20131226/jack-udp.c:237:23: [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). d.buffer_size = atoi(optarg); data/jack-tools-20131226/jack-udp.c:246:20: [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). d.channels = atoi (optarg); data/jack-tools-20131226/jack-udp.c:249: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). port_n = atoi (optarg); data/jack-tools-20131226/c-common/alsa-seq-endpoint.c:57:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(device_name, snd_seq_client_info_get_name(c), size); data/jack-tools-20131226/c-common/alsa-seq-endpoint.c:65:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(port_name, snd_seq_port_info_get_name(p), size); data/jack-tools-20131226/c-common/file.c:57:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t err = read(filedes, buffer, size); data/jack-tools-20131226/c-common/jack-client.c:29:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name,uniq,64); data/jack-tools-20131226/c-common/jack-client.c:41:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(uniq,name,64); data/jack-tools-20131226/c-common/jack-ringbuffer.c:26:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read(fd, &b, 1)== -1) { data/jack-tools-20131226/c-common/jack-ringbuffer.c:40:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read(fd, &b, 1)== -1) { data/jack-tools-20131226/c-common/osc.c:110: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((const char*)b); data/jack-tools-20131226/c-common/osc.c:189: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). i32 n = strlen(data[i].s); data/jack-tools-20131226/c-common/osc.c:193: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). i32 n = strlen(data[i].s); data/jack-tools-20131226/c-common/osc.c:258: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 += osc_cstr_bound(strlen(data->s)); data/jack-tools-20131226/c-common/osc.c:260: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 += osc_cstr_bound(strlen(data->S)); data/jack-tools-20131226/c-common/osc.c:274: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). size_t addr_n = strlen(addr); data/jack-tools-20131226/c-common/osc.c:284: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 u_dsc_n = strlen(u_dsc); data/jack-tools-20131226/c-common/osc.c:326: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). i32 addr_n = strlen(addr); data/jack-tools-20131226/c-common/osc.c:328: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). i32 dsc_n = strlen(dsc); data/jack-tools-20131226/jack-dl.c:135:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(w->cn,"jack-dl",64); data/jack-tools-20131226/jack-play.c:378:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(o.client_name, "jack-play", 64); data/jack-tools-20131226/jack-play.c:398:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(o.client_name, optarg, 64); data/jack-tools-20131226/jack-plumbing.c:169: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/jack-tools-20131226/jack-plumbing.c:316: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). int after_n = strlen(right)- copy_n - 2; data/jack-tools-20131226/jack-plumbing.c:564:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int len = read(fd, buf, INOTIFY_BUFLEN); data/jack-tools-20131226/jack-record.c:201:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(p,optarg,128); data/jack-tools-20131226/jack-scope.c:479:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(p,optarg,128); ANALYSIS SUMMARY: Hits = 101 Lines analyzed = 7207 in approximately 0.24 seconds (29466 lines/second) Physical Source Lines of Code (SLOC) = 6183 Hits@level = [0] 69 [1] 24 [2] 53 [3] 13 [4] 11 [5] 0 Hits@level+ = [0+] 170 [1+] 101 [2+] 77 [3+] 24 [4+] 11 [5+] 0 Hits/KSLOC@level+ = [0+] 27.4947 [1+] 16.3351 [2+] 12.4535 [3+] 3.88161 [4+] 1.77907 [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.