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/ea-utils-1.1.2+dfsg/bam_lpileup.c Examining data/ea-utils-1.1.2+dfsg/fastq-lib.h Examining data/ea-utils-1.1.2+dfsg/fastq-stats.cpp Examining data/ea-utils-1.1.2+dfsg/gcModel.h Examining data/ea-utils-1.1.2+dfsg/razf.c Examining data/ea-utils-1.1.2+dfsg/bam_cat.c Examining data/ea-utils-1.1.2+dfsg/fastq-mcf.c Examining data/ea-utils-1.1.2+dfsg/varcall.cpp Examining data/ea-utils-1.1.2+dfsg/gcModel.c Examining data/ea-utils-1.1.2+dfsg/sam.c Examining data/ea-utils-1.1.2+dfsg/bam_reheader.c Examining data/ea-utils-1.1.2+dfsg/bam.c Examining data/ea-utils-1.1.2+dfsg/tidx/tidx.cpp Examining data/ea-utils-1.1.2+dfsg/tidx/tidx.h Examining data/ea-utils-1.1.2+dfsg/tidx/tidx-lib.cpp Examining data/ea-utils-1.1.2+dfsg/bedidx.c Examining data/ea-utils-1.1.2+dfsg/bam_aux.c Examining data/ea-utils-1.1.2+dfsg/fastq-clipper.c Examining data/ea-utils-1.1.2+dfsg/knetfile.c Examining data/ea-utils-1.1.2+dfsg/utils.h Examining data/ea-utils-1.1.2+dfsg/bgzf.c Examining data/ea-utils-1.1.2+dfsg/sam-stats.cpp Examining data/ea-utils-1.1.2+dfsg/faidx.c Examining data/ea-utils-1.1.2+dfsg/sam_header.c Examining data/ea-utils-1.1.2+dfsg/kstring.c Examining data/ea-utils-1.1.2+dfsg/fastq-lib.cpp Examining data/ea-utils-1.1.2+dfsg/kaln.c Examining data/ea-utils-1.1.2+dfsg/bam_sort.c Examining data/ea-utils-1.1.2+dfsg/fastq-multx.c Examining data/ea-utils-1.1.2+dfsg/bam_import.c Examining data/ea-utils-1.1.2+dfsg/kprobaln.c Examining data/ea-utils-1.1.2+dfsg/razip.c Examining data/ea-utils-1.1.2+dfsg/bam_pileup.c Examining data/ea-utils-1.1.2+dfsg/bam_md.c Examining data/ea-utils-1.1.2+dfsg/phase.c Examining data/ea-utils-1.1.2+dfsg/padding.c Examining data/ea-utils-1.1.2+dfsg/bam_index.c Examining data/ea-utils-1.1.2+dfsg/fastq-join.c FINAL RESULTS: data/ea-utils-1.1.2+dfsg/bam_import.c:89: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(s, str->s); data/ea-utils-1.1.2+dfsg/bam_index.c:402: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(fnidx, fn); strcat(fnidx, ".bai"); data/ea-utils-1.1.2+dfsg/bam_index.c:407: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(fnidx, fn); data/ea-utils-1.1.2+dfsg/bam_index.c:464:10: [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). strcat(strcpy(fnidx, fn), ".bai"); data/ea-utils-1.1.2+dfsg/bam_index.c:491: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(fnidx, fn); strcat(fnidx, ".bai"); data/ea-utils-1.1.2+dfsg/bam_sort.c:342:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(newtext, "@HD\tVN:1.3\tSO:%s\n", so); data/ea-utils-1.1.2+dfsg/bam_sort.c:343: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(newtext, h->text); data/ea-utils-1.1.2+dfsg/bam_sort.c:348:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(newtext + (beg - h->text), "\tSO:%s", so); data/ea-utils-1.1.2+dfsg/bam_sort.c:349: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(newtext, end); data/ea-utils-1.1.2+dfsg/bam_sort.c:392:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s.%.4d.bam", w->prefix, w->index); data/ea-utils-1.1.2+dfsg/bam_sort.c:492:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. else sprintf(fnout, "%s.bam", prefix); data/ea-utils-1.1.2+dfsg/bam_sort.c:507:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fns[i], "%s.%.4d.bam", prefix, i); data/ea-utils-1.1.2+dfsg/faidx.c:195:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s.fai", fn); data/ea-utils-1.1.2+dfsg/faidx.c:264:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s.fai", fn); data/ea-utils-1.1.2+dfsg/fastq-join.c:126: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[i], pre); data/ea-utils-1.1.2+dfsg/fastq-join.c:130: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(p, suffix[i]); data/ea-utils-1.1.2+dfsg/fastq-join.c:131: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(p+strlen(suffix[i]), pre+(p-out[i])+1); data/ea-utils-1.1.2+dfsg/fastq-join.c:133: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(out[i], suffix[i]); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:107:21: [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(tmp, f); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:111:21: [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(tmp, f); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:114:17: [4] (shell) popen: 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. h = popen(tmp, m); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:121:21: [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(tmp, f); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:125:21: [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(tmp, f); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:128:17: [4] (shell) popen: 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. h = popen(tmp, m); data/ea-utils-1.1.2+dfsg/fastq-lib.h:52:23: [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 fail(s,...) ((fprintf(stderr,s,##__VA_ARGS__), exit(1))) data/ea-utils-1.1.2+dfsg/fastq-lib.h:53:23: [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 warn(s,...) ((fprintf(stderr,s,##__VA_ARGS__))) data/ea-utils-1.1.2+dfsg/fastq-mcf.c:902:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(skipfil, "%s.skip.gz", ofil[i]); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:905:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(skipfil, "%s.skip", ofil[i]); data/ea-utils-1.1.2+dfsg/fastq-multx.c:579: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(ent->seq=(char*)malloc(strlen(p)+1), p); data/ea-utils-1.1.2+dfsg/fastq-multx.c:762:4: [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(bc[b].out[i], bc[b].id.s); data/ea-utils-1.1.2+dfsg/fastq-multx.c:763:4: [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(bc[b].out[i], p+1); data/ea-utils-1.1.2+dfsg/fastq-multx.c:1016: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(grs[grcnt].id,s); data/ea-utils-1.1.2+dfsg/fastq-stats.cpp:610:4: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf( ( char * ) str . c_str(), size, fmt . c_str(), ap ); data/ea-utils-1.1.2+dfsg/knetfile.c:311:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fp->retr, "RETR %s\r\n", p); data/ea-utils-1.1.2+dfsg/knetfile.c:313:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fp->size_cmd, "SIZE %s\r\n", p); data/ea-utils-1.1.2+dfsg/knetfile.c:412:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. l += sprintf(buf + l, "GET %s HTTP/1.0\r\nHost: %s\r\n", fp->path, fp->http_host); data/ea-utils-1.1.2+dfsg/kstring.c:13:6: [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. l = vsnprintf(s->s + s->l, s->m - s->l, fmt, ap); // This line does not work with glibc 2.0. See `man snprintf'. data/ea-utils-1.1.2+dfsg/kstring.c:20:7: [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. l = vsnprintf(s->s + s->l, s->m - s->l, fmt, ap); data/ea-utils-1.1.2+dfsg/padding.c:367: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(newtext, header->text); data/ea-utils-1.1.2+dfsg/padding.c:409: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(out_mode, tmp); data/ea-utils-1.1.2+dfsg/phase.c:563: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(s, g.pre); strcat(s, ".0.bam"); g.out[0] = bam_open(s, "w"); data/ea-utils-1.1.2+dfsg/phase.c:564: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(s, g.pre); strcat(s, ".1.bam"); g.out[1] = bam_open(s, "w"); data/ea-utils-1.1.2+dfsg/phase.c:565: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(s, g.pre); strcat(s, ".chimera.bam"); g.out[2] = bam_open(s, "w"); data/ea-utils-1.1.2+dfsg/razip.c:83: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(name, argv[optind]); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:59:36: [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 debugout(s,...) if (debug) fprintf(stderr,s,##__VA_ARGS__) data/ea-utils-1.1.2+dfsg/sam-stats.cpp:61:32: [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 warn(s,...) ((++errs), fprintf(stderr,s,##__VA_ARGS__)) data/ea-utils-1.1.2+dfsg/sam-stats.cpp:299:9: [4] (shell) popen: 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. f = popen(cmd.c_str(), "r"); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:314:12: [4] (shell) popen: 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. f = popen(cmd.c_str(), "r"); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:1061:16: [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. int n = vsnprintf((char *)str.c_str(), size, fmt.c_str(), ap); data/ea-utils-1.1.2+dfsg/sam.c:173: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). strcat(strcpy(fn_list, fn_ref), ".fai"); data/ea-utils-1.1.2+dfsg/sam.c:174: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(fn_list, R_OK) == -1) { // fn_list is unreadable data/ea-utils-1.1.2+dfsg/sam.c:175:7: [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(fn_ref, R_OK) == -1) { data/ea-utils-1.1.2+dfsg/sam_header.c:58: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, format, ap); data/ea-utils-1.1.2+dfsg/sam_header.c:555:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. nout += sprintf(out+nout,"%s", tag->value); data/ea-utils-1.1.2+dfsg/tidx/tidx-lib.cpp:245:15: [4] (shell) popen: 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. FILE *fun=popen(uin.c_str(),"r"); data/ea-utils-1.1.2+dfsg/tidx/tidx-lib.cpp:284:16: [4] (shell) popen: 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. FILE *fout=popen(out.c_str(),"w"); data/ea-utils-1.1.2+dfsg/varcall.cpp:62:26: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define debug(s,...) fprintf(stderr,s,##__VA_ARGS__) data/ea-utils-1.1.2+dfsg/varcall.cpp:67:29: [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 warn(s,...) ++errs; fprintf(stderr,s,##__VA_ARGS__) data/ea-utils-1.1.2+dfsg/varcall.cpp:68: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 die(s,...) (fprintf(stderr,s,##__VA_ARGS__), exit(1)) data/ea-utils-1.1.2+dfsg/varcall.cpp:69:25: [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 stat_out(s,...) fprintf(stat_fout,s,##__VA_ARGS__) data/ea-utils-1.1.2+dfsg/varcall.cpp:703:21: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. int ret=system(string_format("samtools faidx '%s'", ref).c_str()); data/ea-utils-1.1.2+dfsg/varcall.cpp:724:9: [4] (shell) popen: 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. fin = popen(mpil_cmd.c_str(), "r"); data/ea-utils-1.1.2+dfsg/varcall.cpp:735:23: [4] (shell) popen: 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. fin = popen(gunz.c_str(), "r"); data/ea-utils-1.1.2+dfsg/varcall.cpp:1669:14: [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. int n = vsnprintf((char *)str.c_str(), size, fmt.c_str(), ap); data/ea-utils-1.1.2+dfsg/bam_aux.c:209:8: [3] (random) drand48: 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. double drand48() data/ea-utils-1.1.2+dfsg/bam_cat.c:163: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, "h:o:")) >= 0) { data/ea-utils-1.1.2+dfsg/bam_md.c:320: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, "EqreuNhbSC:n:Ad")) >= 0) { data/ea-utils-1.1.2+dfsg/bam_sort.c:270: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, "h:nru1R:f@:l:")) >= 0) { data/ea-utils-1.1.2+dfsg/bam_sort.c:537: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, "nom:@:l:")) >= 0) { data/ea-utils-1.1.2+dfsg/bedidx.c:8:9: [3] (random) drand48: 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. #define drand48() ((double)rand() / RAND_MAX) data/ea-utils-1.1.2+dfsg/fastq-clipper.c:57: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, "-hedbp:i:o:l:m:x::")) != -1) { data/ea-utils-1.1.2+dfsg/fastq-join.c:56: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, "-dRnbeo:t:v:m:p:r:xV")) != -1) { data/ea-utils-1.1.2+dfsg/fastq-lib.h:45:10: [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. #define getopt(a,b,c) getopt_long(a,b,c,NULL,NULL) data/ea-utils-1.1.2+dfsg/fastq-lib.h:45:24: [3] (buffer) getopt_long: 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. #define getopt(a,b,c) getopt_long(a,b,c,NULL,NULL) data/ea-utils-1.1.2+dfsg/fastq-mcf.c:264:18: [3] (buffer) getopt_long: 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_long(argc, argv, "-nf0uXUVHSRdbehp:o:l:s:m:t:k:x:P:q:L:C:w:F:D:",long_options,&option_index)) != -1) { data/ea-utils-1.1.2+dfsg/fastq-multx.c:121: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, "-Dzxnbeov:m:B:g:L:l:G:q:d:t:")) != -1) { data/ea-utils-1.1.2+dfsg/fastq-stats.cpp:180: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, "?DdL:g:x:b:c:w:s:h")) != -1) { data/ea-utils-1.1.2+dfsg/knetfile.c:386: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/ea-utils-1.1.2+dfsg/kprobaln.c:255: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:q:")) >= 0) { data/ea-utils-1.1.2+dfsg/padding.c:389: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, "Sso:u1T:?")) >= 0) { data/ea-utils-1.1.2+dfsg/phase.c:314:13: [3] (random) drand48: 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. is_flip = (drand48() < 0.5); data/ea-utils-1.1.2+dfsg/phase.c:337:28: [3] (random) drand48: 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. if (which == 3) which = (drand48() < 0.5); data/ea-utils-1.1.2+dfsg/phase.c:526: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, "Q:eFq:k:b:l:D:A:")) >= 0) { data/ea-utils-1.1.2+dfsg/razip.c:56: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, "cdlhfb:s:")) >= 0){ data/ea-utils-1.1.2+dfsg/sam-stats.cpp:226:18: [3] (buffer) getopt_long: 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_long(argc, argv, "?BzArR:Ddx:MhS:", long_options, &long_index)) != -1) { data/ea-utils-1.1.2+dfsg/tidx/tidx.cpp:40:18: [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, "Dlhdt:r:c:b:T:e:p:i:s:a:nB")) != -1) { data/ea-utils-1.1.2+dfsg/varcall.cpp:291:15: [3] (buffer) getopt_long: 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_long(argc, argv, "?svVBhe:m:N:x:f:p:a:g:q:Q:i:o:D:R:b:L:S:",NULL,NULL)) != -1) { data/ea-utils-1.1.2+dfsg/varcall.cpp:390:5: [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(1); data/ea-utils-1.1.2+dfsg/bam.c:84: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/ea-utils-1.1.2+dfsg/bam.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 buf[4]; data/ea-utils-1.1.2+dfsg/bam.c:177: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(&n, s + 1, 4); data/ea-utils-1.1.2+dfsg/bam.c:322: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(&n, s, 4); data/ea-utils-1.1.2+dfsg/bam.c:462: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(cigar, new_cigar, l * 4); // set CIGAR data/ea-utils-1.1.2+dfsg/bam_aux.c:8:38: [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. void bam_aux_append(bam1_t *b, const char tag[2], char type, int len, uint8_t *data) data/ea-utils-1.1.2+dfsg/bam_aux.c:20: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->data + ori_len + 3, data, len); data/ea-utils-1.1.2+dfsg/bam_aux.c:23:44: [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. uint8_t *bam_aux_get_core(bam1_t *b, const char tag[2]) data/ea-utils-1.1.2+dfsg/bam_aux.c:36:45: [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. uint8_t *bam_aux_get(const bam1_t *b, const char tag[2]) data/ea-utils-1.1.2+dfsg/bam_aux.c:150:10: [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). *beg = atoi(s + name_end + 1); data/ea-utils-1.1.2+dfsg/bam_aux.c:152: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). *end = i < k? atoi(s + i + 1) : 1<<29; data/ea-utils-1.1.2+dfsg/bam_cat.c:126:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ebuf,ebuf+len,diff); data/ea-utils-1.1.2+dfsg/bam_cat.c:127:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ebuf+diff,buf,len); data/ea-utils-1.1.2+dfsg/bam_cat.c:131:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ebuf,buf+len,es); data/ea-utils-1.1.2+dfsg/bam_import.c:24: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. unsigned char bam_nt16_table[256] = { data/ea-utils-1.1.2+dfsg/bam_import.c:136:9: [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). len = atoi(str->s); data/ea-utils-1.1.2+dfsg/bam_import.c:211:22: [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). h->target_len[i] = atoi(tmp[i]); data/ea-utils-1.1.2+dfsg/bam_import.c:259: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(alloc_data(b, doff + c->l_qname) + doff, str->s, c->l_qname); data/ea-utils-1.1.2+dfsg/bam_import.c:282:96: [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). ret = ks_getuntil(ks, KS_SEP_TAB, str, &dret); z += str->l + 1; c->pos = isdigit(str->s[0])? atoi(str->s) - 1 : -1; data/ea-utils-1.1.2+dfsg/bam_import.c:283:97: [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). ret = ks_getuntil(ks, KS_SEP_TAB, str, &dret); z += str->l + 1; c->qual = isdigit(str->s[0])? atoi(str->s) : 0; data/ea-utils-1.1.2+dfsg/bam_import.c:333:33: [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). c->mpos = isdigit(str->s[0])? atoi(str->s) - 1 : -1; data/ea-utils-1.1.2+dfsg/bam_import.c:335:56: [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). c->isize = (str->s[0] == '-' || isdigit(str->s[0]))? atoi(str->s) : 0; data/ea-utils-1.1.2+dfsg/bam_import.c:435: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(s, str->s + 5, str->l - 5); data/ea-utils-1.1.2+dfsg/bam_import.c:449: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(s, &n, 4); s += 4; // write the number of elements data/ea-utils-1.1.2+dfsg/bam_index.c: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 magic[4]; data/ea-utils-1.1.2+dfsg/bam_index.c:402:21: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcpy(fnidx, fn); strcat(fnidx, ".bai"); data/ea-utils-1.1.2+dfsg/bam_index.c:403: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(fnidx, "rb"); data/ea-utils-1.1.2+dfsg/bam_index.c:409:9: [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(fnidx, "rb"); data/ea-utils-1.1.2+dfsg/bam_index.c:439:12: [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(fn, "wb")) == 0) { data/ea-utils-1.1.2+dfsg/bam_index.c:464: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(strcpy(fnidx, fn), ".bai"); data/ea-utils-1.1.2+dfsg/bam_index.c:491:22: [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. strcpy(fnidx, fn); strcat(fnidx, ".bai"); data/ea-utils-1.1.2+dfsg/bam_index.c:493:10: [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). fpidx = fopen(fnidx, "wb"); data/ea-utils-1.1.2+dfsg/bam_lpileup.c:146: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(tv->pre_level, tv->cur_level, tv->n_cur * 4); data/ea-utils-1.1.2+dfsg/bam_md.c:249: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(bq, qual, c->l_qseq); data/ea-utils-1.1.2+dfsg/bam_md.c:331:22: [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). case 'n': max_nm = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/bam_md.c:332: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). case 'C': capQ = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/bam_sort.c:218:18: [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. if (level >= 0) sprintf(mode + 1, "%d", level < 9? level : 9); data/ea-utils-1.1.2+dfsg/bam_sort.c:279:21: [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). case 'l': level = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/bam_sort.c:280:25: [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). case '@': n_threads = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/bam_sort.c:301: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(argv[optind], "rb"); data/ea-utils-1.1.2+dfsg/bam_sort.c:495: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 mode[8]; data/ea-utils-1.1.2+dfsg/bam_sort.c:497:19: [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. if (level >= 0) sprintf(mode + 1, "%d", level < 9? level : 9); data/ea-utils-1.1.2+dfsg/bam_sort.c:549:25: [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). case '@': n_threads = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/bam_sort.c:550:21: [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). case 'l': level = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/bedidx.c:124:11: [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). beg = atoi(str->s); // begin data/ea-utils-1.1.2+dfsg/bedidx.c:127: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). end = atoi(str->s); // end data/ea-utils-1.1.2+dfsg/bgzf.c:54:30: [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). #define _bgzf_open(fn, mode) fopen(fn, mode) data/ea-utils-1.1.2+dfsg/bgzf.c:150: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). if ((fpw = fopen(path, "w")) == 0) return 0; data/ea-utils-1.1.2+dfsg/bgzf.c:192: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(dst, g_magic, BLOCK_HEADER_LENGTH); // the last two bytes are a place holder for the length of the block data/ea-utils-1.1.2+dfsg/bgzf.c:270: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(fp->uncompressed_block, p->block, BGZF_MAX_BLOCK_SIZE); data/ea-utils-1.1.2+dfsg/bgzf.c:299: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(kh_val(h, k).block, fp->uncompressed_block, BGZF_MAX_BLOCK_SIZE); data/ea-utils-1.1.2+dfsg/bgzf.c:326: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(compressed_block, header, BLOCK_HEADER_LENGTH); data/ea-utils-1.1.2+dfsg/bgzf.c:358: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(output, buffer + fp->block_offset, copy_length); data/ea-utils-1.1.2+dfsg/bgzf.c:406: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(w->mt->blk[i], w->buf, clen); data/ea-utils-1.1.2+dfsg/bgzf.c:472: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(mt->blk[mt->curr], fp->uncompressed_block, fp->block_offset); data/ea-utils-1.1.2+dfsg/bgzf.c:517: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(fp->uncompressed_block + fp->block_offset, input, copy_length); data/ea-utils-1.1.2+dfsg/bgzf.c:561: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 + fp->block_offset, input, copy_length); data/ea-utils-1.1.2+dfsg/bgzf.c:682: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->s + str->l, buf + fp->block_offset, l); data/ea-utils-1.1.2+dfsg/faidx.c:28:29: [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). #define razf_open(fn, mode) fopen(fn, mode) data/ea-utils-1.1.2+dfsg/faidx.c:204: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(str, "wb"); data/ea-utils-1.1.2+dfsg/faidx.c:232:10: [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(fn, "r"); data/ea-utils-1.1.2+dfsg/faidx.c:242:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(fn, "wb")) == 0) { data/ea-utils-1.1.2+dfsg/faidx.c:254:12: [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). return fopen(fn, "r"); data/ea-utils-1.1.2+dfsg/faidx.c:279:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(str, "rb"); data/ea-utils-1.1.2+dfsg/faidx.c:283:8: [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(str, "rb"); data/ea-utils-1.1.2+dfsg/faidx.c:351:9: [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). beg = atoi(s + name_end + 1); data/ea-utils-1.1.2+dfsg/faidx.c:353: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). end = i < k? atoi(s + i + 1) : val.len; data/ea-utils-1.1.2+dfsg/fastq-clipper.c:68: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). case 'm': nmin = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-clipper.c:69: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). case 'p': pctdiff = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-clipper.c:70:21: [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). case 'l': nkeep = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-clipper.c:75:29: [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). case 'x': xmax = optarg ? atoi(optarg) : -1; break; data/ea-utils-1.1.2+dfsg/fastq-clipper.c:97:30: [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 *fin = strcmp(f,"-") ? fopen(f, "r") : stdin; data/ea-utils-1.1.2+dfsg/fastq-clipper.c:106:10: [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). fout = fopen(outfile, "w"); data/ea-utils-1.1.2+dfsg/fastq-clipper.c:114: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 *adapters[MAX_ADAPTER_NUM+1]; data/ea-utils-1.1.2+dfsg/fastq-clipper.c:128: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 *s[4] = {0,0,0,0}; // id, sequence, comment, quality data/ea-utils-1.1.2+dfsg/fastq-join.c:32: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). #define SVNREV atoi(strchr("$LastChangedRevision: 679 $", ':')+1) data/ea-utils-1.1.2+dfsg/fastq-join.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 *in[3] = {0,0,0}; data/ea-utils-1.1.2+dfsg/fastq-join.c:41: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 *out[5]; data/ea-utils-1.1.2+dfsg/fastq-join.c:76: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). case 't': threads = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-join.c:78: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). case 'm': mino = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-join.c:80: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). case 'p': pctdiff = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-join.c:118: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 *suffix[5]={"un1", "un2", "join", "un3", "join2"}; data/ea-utils-1.1.2+dfsg/fastq-join.c:148:24: [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). frep = fopen(orep, "w"); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:106:21: [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(tmp, "gzip --rsyncable > '"); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:110:21: [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(tmp, "gunzip -c '"); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:120:21: [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(tmp, "zip -q '"); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:122:21: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(tmp, "' -"); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:124:21: [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(tmp, "unzip -p '"); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:132:21: [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). h = fopen(f, m); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:35: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). #define SVNREV atoi(strchr("$LastChangedRevision: 676 $", ':')+1) data/ea-utils-1.1.2+dfsg/fastq-mcf.c:54: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 escan[SCANLEN+1]; // scan sequence data/ea-utils-1.1.2+dfsg/fastq-mcf.c:60: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 end[MAX_FILES]; // 'b' or 'e' data/ea-utils-1.1.2+dfsg/fastq-mcf.c:127:13: [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(*lineptr,buf[bp].data(),l); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:214: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 end[MAX_FILES]; meminit(end); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:234: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 *ifil[MAX_FILES]; meminit(ifil); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:235: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 *ofil[MAX_FILES]; meminit(ofil); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:240: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 *fref[MAX_REF]; meminit(fref); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:270:42: [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). qf_mean=qf2_mean=atoi(optarg); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:272:34: [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). qf2_mean=atoi(optarg); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:284: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). qf_xgt_num=qf2_xgt_num=atoi(optarg); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:285: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). qf_xgt_min=qf2_xgt_min=atoi(strchr(optarg, ',')+1); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:291:37: [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). qf2_xgt_num=atoi(optarg); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:292:37: [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). qf2_xgt_min=atoi(strchr(optarg, ',')+1); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:299:31: [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). a.pos=atoi(optarg); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:300:31: [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). a.adj=atoi(strchr(optarg, ',')+1); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:303:42: [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). phred_adjust_max=atoi(optarg); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:309:35: [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 phred=atoi(optarg); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:310:33: [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 adj=atoi(strchr(optarg, ',')+1); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:317:42: [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). qf_max_n_pct=atoi(optarg); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:318:43: [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). qf2_max_n_pct=atoi(optarg); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:320:39: [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). qf_max_ns=atoi(optarg); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:321: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). qf2_max_ns=atoi(optarg); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:326:43: [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). qf2_max_n_pct=atoi(optarg); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:328: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). qf2_max_ns=atoi(optarg); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:331:37: [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). qf2_min_len=atoi(optarg); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:345:21: [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). case 'm': nmin = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-mcf.c:346:22: [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). case 'l': nkeep = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-mcf.c:347:21: [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). case 'L': nmax = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-mcf.c:354:21: [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). case 'q': qthr = atoi(optarg); valid_arg(c,optarg); break; data/ea-utils-1.1.2+dfsg/fastq-mcf.c:356:21: [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). case 'w': qwin = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-mcf.c:357: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). case 'C': sampcnt = atoi(optarg); if (sampcnt*8 > max_in_buffer) max_in_buffer = sampcnt * 8; break; data/ea-utils-1.1.2+dfsg/fastq-mcf.c:362: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). case 'p': pctdiff = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-mcf.c:363:29: [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). case 'P': phred = (char) atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-mcf.c:364: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). case 'D': duplen = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-mcf.c:414:9: [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). ain = fopen(afil, "r"); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:672: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[SCANLEN+1]; data/ea-utils-1.1.2+dfsg/fastq-mcf.c:898:22: [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 *skipfil = (char *) malloc(strlen(ofil[i])+10); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:900: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. char *p=(char *)strrchr(ofil[i],'.'); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:1656:7: [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). a=atoi(optarg); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:1657:7: [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). b=atoi(strchr(optarg, ',')+1); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:1679:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, argv[i], k); data/ea-utils-1.1.2+dfsg/fastq-multx.c:38: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). #define SVNREV atoi(strchr("$LastChangedRevision: 684 $", ':')+1) data/ea-utils-1.1.2+dfsg/fastq-multx.c:44: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 *out[6]; // one output per input data/ea-utils-1.1.2+dfsg/fastq-multx.c:105: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[6]; data/ea-utils-1.1.2+dfsg/fastq-multx.c:106: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 *out[6]; data/ea-utils-1.1.2+dfsg/fastq-multx.c:159: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). case 'm': mismatch = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-multx.c:160: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). case 'd': distance = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-multx.c:161: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). case 'q': quality = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-multx.c:220:21: [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 *lin = fopen(list, "r"); data/ea-utils-1.1.2+dfsg/fastq-multx.c:598:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *bin = fopen(bfil, "r"); data/ea-utils-1.1.2+dfsg/fastq-multx.c:759:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. bc[b].out[i]=(char *) malloc(strlen(out[i])+strlen(bc[b].id.s)+100); data/ea-utils-1.1.2+dfsg/fastq-stats.cpp:182:25: [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). case 'c': cyclemax = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-stats.cpp:185: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). case 'w': window = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-stats.cpp:186:25: [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). case 's': show_max = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/fastq-stats.cpp:372: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). myfile = fopen(gc_outfile, "w"); data/ea-utils-1.1.2+dfsg/fastq-stats.cpp:431: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). myfile = fopen(brkdown_outfile,"wd"); data/ea-utils-1.1.2+dfsg/fastq-stats.cpp:444:12: [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). myfile = fopen(fastx_outfile,"wd"); data/ea-utils-1.1.2+dfsg/fastq-stats.cpp:510:12: [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). myfile = fopen(brkdown_outfile,"wd"); data/ea-utils-1.1.2+dfsg/fastq-stats.cpp:522:12: [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). myfile = fopen(lenhist_outfile,"wd"); data/ea-utils-1.1.2+dfsg/knetfile.c:175:26: [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). server.sin_port = htons(atoi(port)); data/ea-utils-1.1.2+dfsg/knetfile.c:249: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(ftp->pasv_ip, v, 4 * sizeof(int)); data/ea-utils-1.1.2+dfsg/knetfile.c:257: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 host[80], port[10]; data/ea-utils-1.1.2+dfsg/knetfile.c:262: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(host, "%d.%d.%d.%d", ftp->pasv_ip[0], ftp->pasv_ip[1], ftp->pasv_ip[2], ftp->pasv_ip[3]); data/ea-utils-1.1.2+dfsg/knetfile.c:263: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(port, "%d", ftp->pasv_port); data/ea-utils-1.1.2+dfsg/knetfile.c:342: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[32]; data/ea-utils-1.1.2+dfsg/knetfile.c:344: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(tmp, "REST %lld\r\n", (long long)fp->offset); data/ea-utils-1.1.2+dfsg/knetfile.c:346:3: [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(tmp, "REST "); data/ea-utils-1.1.2+dfsg/knetfile.c:348: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(tmp, "\r\n"); data/ea-utils-1.1.2+dfsg/knetfile.c:413:10: [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. l += sprintf(buf + l, "Range: bytes=%lld-\r\n", (long long)fp->offset); data/ea-utils-1.1.2+dfsg/knetfile.c:414: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. l += sprintf(buf + l, "\r\n"); data/ea-utils-1.1.2+dfsg/knetfile.c:475: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). int fd = open(fn, O_RDONLY | O_BINARY); data/ea-utils-1.1.2+dfsg/knetfile.c:477: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). int fd = open(fn, O_RDONLY); data/ea-utils-1.1.2+dfsg/kprobaln.c:257: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). case 'b': b = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/kprobaln.c:258: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). case 'q': q = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/padding.c:22: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(b->data + b->core.l_qname, cigar, n * 4); data/ea-utils-1.1.2+dfsg/padding.c:25: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. } else memcpy(b->data + b->core.l_qname, cigar, n * 4); data/ea-utils-1.1.2+dfsg/padding.c:384: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_mode[5], out_mode[5], *fn_out = 0, *fn_list = 0, *fn_ref = 0; data/ea-utils-1.1.2+dfsg/padding.c:407: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[2]; data/ea-utils-1.1.2+dfsg/phase.c:481:39: [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). uint64_t x = (uint64_t)tid<<32 | (atoi(str->s) - 1); data/ea-utils-1.1.2+dfsg/phase.c:528: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). case 'D': g.max_depth = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/phase.c:529:29: [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). case 'q': g.min_varLOD = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/phase.c:530: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). case 'Q': g.min_baseQ = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/phase.c:531: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). case 'k': g.k = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/phase.c:563:21: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcpy(s, g.pre); strcat(s, ".0.bam"); g.out[0] = bam_open(s, "w"); data/ea-utils-1.1.2+dfsg/phase.c:564:21: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcpy(s, g.pre); strcat(s, ".1.bam"); g.out[1] = bam_open(s, "w"); data/ea-utils-1.1.2+dfsg/phase.c:565:21: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcpy(s, g.pre); strcat(s, ".chimera.bam"); g.out[2] = bam_open(s, "w"); data/ea-utils-1.1.2+dfsg/razf.c:382: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(rz->outbuf, rz->inbuf, n); data/ea-utils-1.1.2+dfsg/razf.c:506: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_RDONLY | O_BINARY); data/ea-utils-1.1.2+dfsg/razf.c:508: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_RDONLY); data/ea-utils-1.1.2+dfsg/razf.c:515: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_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666); data/ea-utils-1.1.2+dfsg/razf.c:517: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_WRONLY | O_CREAT | O_TRUNC, 0666); data/ea-utils-1.1.2+dfsg/razip.c:30: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). if ((fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 0666)) < 0 && errno == EEXIST) { data/ea-utils-1.1.2+dfsg/razip.c:40: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). if ((fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) { data/ea-utils-1.1.2+dfsg/razip.c:62:21: [2] (integer) atol: 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). case 'b': start = atol(optarg); break; data/ea-utils-1.1.2+dfsg/razip.c:63:20: [2] (integer) atol: 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). case 's': size = atol(optarg); break; data/ea-utils-1.1.2+dfsg/razip.c:75: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). if((f_src = open(argv[optind], O_RDONLY)) < 0){ data/ea-utils-1.1.2+dfsg/razip.c:84:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(name, ".rz"); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:46: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). #define SVNREV atoi(strchr("$LastChangedRevision: 681 $", ':')+1) data/ea-utils-1.1.2+dfsg/sam-stats.cpp:235:35: [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). case 'S': histnum=atoi(optarg); break; data/ea-utils-1.1.2+dfsg/sam-stats.cpp:256: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 *stdv[3] = {argv[0],"-",NULL}; data/ea-utils-1.1.2+dfsg/sam-stats.cpp:336:10: [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(in, "r"); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:346:22: [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). sefq=fopen((out+".fq").c_str(),"w"); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:347:23: [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). pefq1=fopen((out+".fq1").c_str(),"w"); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:348:23: [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). pefq2=fopen((out+".fq2").c_str(),"w"); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:352: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). o=fopen(out.c_str(), "w"); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:376:18: [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). rnao=fopen(rnafile,"w"); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:866:12: [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). slen=atoi(&t[3]); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:877: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 *d[100]; meminit(d); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:888:8: [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). nm=atoi(&d[i][5]); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:922:37: [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). dostats(d[S_ID],strlen(d[S_READ]),atoi(d[S_BITS]),d[S_NMO],atoi(d[S_POS]),atoi(d[S_MAPQ]),d[S_MATEREF],atoi(d[S_MATE]),d[S_READ],d[S_QUAL],nm, ins, del); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:922:62: [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). dostats(d[S_ID],strlen(d[S_READ]),atoi(d[S_BITS]),d[S_NMO],atoi(d[S_POS]),atoi(d[S_MAPQ]),d[S_MATEREF],atoi(d[S_MATE]),d[S_READ],d[S_QUAL],nm, ins, del); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:922:77: [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). dostats(d[S_ID],strlen(d[S_READ]),atoi(d[S_BITS]),d[S_NMO],atoi(d[S_POS]),atoi(d[S_MAPQ]),d[S_MATEREF],atoi(d[S_MATE]),d[S_READ],d[S_QUAL],nm, ins, del); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:922:106: [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). dostats(d[S_ID],strlen(d[S_READ]),atoi(d[S_BITS]),d[S_NMO],atoi(d[S_POS]),atoi(d[S_MAPQ]),d[S_MATEREF],atoi(d[S_MATE]),d[S_READ],d[S_QUAL],nm, ins, del); data/ea-utils-1.1.2+dfsg/sam.c:17: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(h->text, h0->text, h->l_text); data/ea-utils-1.1.2+dfsg/sam.c:76: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 bmode[3]; data/ea-utils-1.1.2+dfsg/sam.c:88:34: [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->x.tamw = strcmp(fn, "-")? fopen(fn, "w") : stdout; data/ea-utils-1.1.2+dfsg/sam.c:173:2: [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(strcpy(fn_list, fn_ref), ".fai"); data/ea-utils-1.1.2+dfsg/sam_header.c:22:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char key[2]; data/ea-utils-1.1.2+dfsg/sam_header.c:29: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 type[2]; data/ea-utils-1.1.2+dfsg/sam_header.c:175: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(*lineptr,text,len); data/ea-utils-1.1.2+dfsg/sam_header.c:191: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(tag->value,value_from,len+1); data/ea-utils-1.1.2+dfsg/sam_header.c:546:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. nout += sprintf(out+nout,"@%c%c",hline->type[0],hline->type[1]); data/ea-utils-1.1.2+dfsg/sam_header.c:554:25: [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. nout += sprintf(out+nout,"%c%c:", tag->key[0],tag->key[1]); data/ea-utils-1.1.2+dfsg/sam_header.c:597:41: [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. void *sam_header2tbl(const void *_dict, char type[2], char key_tag[2], char value_tag[2]) data/ea-utils-1.1.2+dfsg/sam_header.c:597:55: [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. void *sam_header2tbl(const void *_dict, char type[2], char key_tag[2], char value_tag[2]) data/ea-utils-1.1.2+dfsg/sam_header.c:597:72: [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. void *sam_header2tbl(const void *_dict, char type[2], char key_tag[2], char value_tag[2]) data/ea-utils-1.1.2+dfsg/sam_header.c:635: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 **sam_header2list(const void *_dict, char type[2], char key_tag[2], int *_n) data/ea-utils-1.1.2+dfsg/sam_header.c:635:43: [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 **sam_header2list(const void *_dict, char type[2], char key_tag[2], int *_n) data/ea-utils-1.1.2+dfsg/sam_header.c:635:57: [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 **sam_header2list(const void *_dict, char type[2], char key_tag[2], int *_n) data/ea-utils-1.1.2+dfsg/sam_header.c:672:44: [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. void *sam_header2key_val(void *iter, const char type[2], const char key_tag[2], const char value_tag[2], const char **_key, const char **_value) data/ea-utils-1.1.2+dfsg/sam_header.c:672:64: [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. void *sam_header2key_val(void *iter, const char type[2], const char key_tag[2], const char value_tag[2], const char **_key, const char **_value) data/ea-utils-1.1.2+dfsg/sam_header.c:672:87: [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. void *sam_header2key_val(void *iter, const char type[2], const char key_tag[2], const char value_tag[2], const char **_key, const char **_value) data/ea-utils-1.1.2+dfsg/tidx/tidx-lib.cpp:189:12: [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). fh=fopen(path.c_str(),"rb"); data/ea-utils-1.1.2+dfsg/tidx/tidx-lib.cpp:212:12: [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). fh=fopen(path.c_str(),"rb"); data/ea-utils-1.1.2+dfsg/tidx/tidx-lib.cpp:275:12: [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 *fin=fopen(in,"r"); data/ea-utils-1.1.2+dfsg/tidx/tidx-lib.cpp:311:19: [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). a.beg=atoi(v[nbeg]); data/ea-utils-1.1.2+dfsg/tidx/tidx-lib.cpp:312:19: [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). a.end=atoi(v[nend]); data/ea-utils-1.1.2+dfsg/tidx/tidx.cpp:60:30: [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). skip_i = atoi(optarg); data/ea-utils-1.1.2+dfsg/tidx/tidx.cpp:69: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). nchr = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/tidx/tidx.cpp:75: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). nbeg = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/tidx/tidx.cpp:77: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). nend = atoi(optarg); break; data/ea-utils-1.1.2+dfsg/tidx/tidx.cpp:137:24: [2] (integer) atol: 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). long pos = atol(p); data/ea-utils-1.1.2+dfsg/tidx/tidx.cpp:149:52: [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 *fin = !strcmp(ain,"-") ? stdin : fopen(ain, "r"); data/ea-utils-1.1.2+dfsg/tidx/tidx.cpp:165:65: [2] (integer) atol: 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). string tmp = vmap[f_i]->lookup(v[nchr], atol(v[nbeg]), msep); data/ea-utils-1.1.2+dfsg/varcall.cpp:47: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). #define SVNREV atoi(strchr("$Revision: 632 $", ':')+1) data/ea-utils-1.1.2+dfsg/varcall.cpp:267: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). FILE *f=fopen(path, mode); data/ea-utils-1.1.2+dfsg/varcall.cpp:294: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). case 'm': umindepth=atoi(optarg); break; data/ea-utils-1.1.2+dfsg/varcall.cpp:295: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). case 'q': min_qual=atoi(optarg); break; data/ea-utils-1.1.2+dfsg/varcall.cpp:297: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). case 'Q': min_mapq=atoi(optarg); break; data/ea-utils-1.1.2+dfsg/varcall.cpp:299: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). case 'R': repeat_filter=atoi(optarg); break; data/ea-utils-1.1.2+dfsg/varcall.cpp:301:25: [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). case 'a': uminadepth=atoi(optarg);break; data/ea-utils-1.1.2+dfsg/varcall.cpp:303:25: [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). case 'i': uminidepth=atoi(optarg);break; data/ea-utils-1.1.2+dfsg/varcall.cpp:309: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). debug_xpos=atoi(++p); data/ea-utils-1.1.2+dfsg/varcall.cpp:318:26: [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). case 'L': total_locii=atoi(optarg); break; data/ea-utils-1.1.2+dfsg/varcall.cpp:371: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). noise_f = fopen(noiseout, "w"); data/ea-utils-1.1.2+dfsg/varcall.cpp:379: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 *stdv[3] = {argv[0],"-",NULL}; data/ea-utils-1.1.2+dfsg/varcall.cpp:497:20: [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 * f = fopen(read_stats, "r"); data/ea-utils-1.1.2+dfsg/varcall.cpp:508:50: [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). if (umindepth && umindepth > atoi(val)) { data/ea-utils-1.1.2+dfsg/varcall.cpp:511:47: [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). if (!umindepth) umindepth=atoi(val); data/ea-utils-1.1.2+dfsg/varcall.cpp:517:52: [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). if (total_locii<0) total_locii=atoi(val); data/ea-utils-1.1.2+dfsg/varcall.cpp:738:23: [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). fin = fopen(in[0], "r"); data/ea-utils-1.1.2+dfsg/varcall.cpp:794:6: [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). Pos=atoi(d[1]); data/ea-utils-1.1.2+dfsg/varcall.cpp:796:10: [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). Depth = atoi(d[3]); data/ea-utils-1.1.2+dfsg/varcall.cpp:1510:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(path,"r"); data/ea-utils-1.1.2+dfsg/bam.c:128:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(buf, "BAM\001", 4); data/ea-utils-1.1.2+dfsg/bam.c:145: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). name_len = strlen(p) + 1; data/ea-utils-1.1.2+dfsg/bam_aux.c:118: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). name_end = l = strlen(str); data/ea-utils-1.1.2+dfsg/bam_import.c:189:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(header->text + header->l_text, str->s, str->l+1); // we cannot use strcpy() here. data/ea-utils-1.1.2+dfsg/bam_import.c:258: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). c->l_qname = strlen(str->s) + 1; data/ea-utils-1.1.2+dfsg/bam_import.c:344: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). c->l_qseq = strlen(str->s); data/ea-utils-1.1.2+dfsg/bam_import.c:357:43: [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(str->s, "*") && c->l_qseq != strlen(str->s)) data/ea-utils-1.1.2+dfsg/bam_index.c:396: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). int l = strlen(_fn); data/ea-utils-1.1.2+dfsg/bam_index.c:401:24: [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). fnidx = (char*)calloc(strlen(fn) + 5, 1); data/ea-utils-1.1.2+dfsg/bam_index.c:406: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). if (s == fn + strlen(fn) - 3) { data/ea-utils-1.1.2+dfsg/bam_index.c:408: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). fnidx[strlen(fn)-1] = 'i'; data/ea-utils-1.1.2+dfsg/bam_index.c:430: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(url); data/ea-utils-1.1.2+dfsg/bam_index.c:463:24: [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 *fnidx = calloc(strlen(fn) + 5, 1); data/ea-utils-1.1.2+dfsg/bam_index.c:490: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). fnidx = (char*)calloc(strlen(fn) + 5, 1); data/ea-utils-1.1.2+dfsg/bam_md.c:106: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((char*)old_md+1) == str->l) { data/ea-utils-1.1.2+dfsg/bam_md.c:319:2: [1] (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 character. strcpy(mode_r, "r"); strcpy(mode_w, "w"); data/ea-utils-1.1.2+dfsg/bam_md.c:319:23: [1] (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 character. strcpy(mode_r, "r"); strcpy(mode_w, "w"); data/ea-utils-1.1.2+dfsg/bam_md.c:338:18: [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. if (!is_sam_in) strcat(mode_r, "b"); data/ea-utils-1.1.2+dfsg/bam_md.c:339:18: [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. if (is_bam_out) strcat(mode_w, "b"); data/ea-utils-1.1.2+dfsg/bam_md.c:340:7: [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. else strcat(mode_w, "h"); data/ea-utils-1.1.2+dfsg/bam_md.c:341:23: [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. if (is_uncompressed) strcat(mode_w, "u"); data/ea-utils-1.1.2+dfsg/bam_sort.c:123: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 l = strlen(fn[i]); data/ea-utils-1.1.2+dfsg/bam_sort.c:130:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(RG[i], s + j, l); data/ea-utils-1.1.2+dfsg/bam_sort.c:217:2: [1] (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 character. strcpy(mode, "w"); data/ea-utils-1.1.2+dfsg/bam_sort.c:340: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). h->l_text += strlen(so) + 15; data/ea-utils-1.1.2+dfsg/bam_sort.c:345: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). h->l_text = (beg - h->text) + (4 + strlen(so)) + (h->text + h->l_text - end); data/ea-utils-1.1.2+dfsg/bam_sort.c:347:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(newtext, h->text, beg - h->text); data/ea-utils-1.1.2+dfsg/bam_sort.c:391:23: [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). name = (char*)calloc(strlen(w->prefix) + 20, 1); data/ea-utils-1.1.2+dfsg/bam_sort.c:490: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). fnout = calloc(strlen(prefix) + 20, 1); data/ea-utils-1.1.2+dfsg/bam_sort.c:491:17: [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. if (is_stdout) sprintf(fnout, "-"); data/ea-utils-1.1.2+dfsg/bam_sort.c:496:3: [1] (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 character. strcpy(mode, "w"); data/ea-utils-1.1.2+dfsg/bam_sort.c:506: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). fns[i] = (char*)calloc(strlen(prefix) + 20, 1); data/ea-utils-1.1.2+dfsg/faidx.c:194:22: [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 = (char*)calloc(strlen(fn) + 5, 1); data/ea-utils-1.1.2+dfsg/faidx.c:226: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 l = strlen(fn); data/ea-utils-1.1.2+dfsg/faidx.c:263:22: [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 = (char*)calloc(strlen(fn) + 5, 1); data/ea-utils-1.1.2+dfsg/faidx.c:314: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). name_end = l = strlen(str); data/ea-utils-1.1.2+dfsg/fastq-clipper.c:121:46: [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). adapter_len[adapter_count] = strlen(p); // append to list data/ea-utils-1.1.2+dfsg/fastq-join.c:84: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). if (strlen(optarg)>1) { data/ea-utils-1.1.2+dfsg/fastq-join.c:125: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). out[i]=(char *)malloc(strlen(pre)+10); data/ea-utils-1.1.2+dfsg/fastq-join.c:131: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). strcpy(p+strlen(suffix[i]), pre+(p-out[i])+1); data/ea-utils-1.1.2+dfsg/fastq-join.c:159:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char c=getc(fin[i]); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:40:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char c = fgetc(in); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:47:8: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(in); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:58:3: [1] (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 character. strcpy(fq->com.s,"+"); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:104: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). char *tmp=(char *)malloc(strlen(f)+100); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:108:21: [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(tmp, "'"); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:112:21: [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(tmp, "'"); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:118: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). char *tmp=(char *)malloc(strlen(f)+100); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:126:21: [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(tmp, "'"); data/ea-utils-1.1.2+dfsg/fastq-lib.cpp:284:24: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). register int c = getc (stream); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:457:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ad[acnt].escan, ad[acnt].seq, SCANLEN); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:673:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, s, SCANLEN); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:898: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). char *skipfil = (char *) malloc(strlen(ofil[i])+10); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:1243: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). if (dotrim[f][1] >= strlen(fq[f].seq.s)) { data/ea-utils-1.1.2+dfsg/fastq-mcf.c:1407: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). memmove(fa->id, p, strlen(p)+1); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:1408: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). fa->nid=strlen(fa->id); data/ea-utils-1.1.2+dfsg/fastq-mcf.c:1665: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). int k=strlen(argv[i]); data/ea-utils-1.1.2+dfsg/fastq-multx.c:140: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(optarg)>1) { data/ea-utils-1.1.2+dfsg/fastq-multx.c:253: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). bcg[bgcnt].b.dual_n = strlen(bcg[bgcnt].b.dual); data/ea-utils-1.1.2+dfsg/fastq-multx.c:257: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). bcg[bgcnt].b.id.n=strlen(bcg[bgcnt].b.id.s); data/ea-utils-1.1.2+dfsg/fastq-multx.c:258:32: [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). bcg[bgcnt].b.seq.n=strlen(bcg[bgcnt].b.seq.s); data/ea-utils-1.1.2+dfsg/fastq-multx.c:579:34: [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). strcpy(ent->seq=(char*)malloc(strlen(p)+1), p); data/ea-utils-1.1.2+dfsg/fastq-multx.c:618:23: [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). bc[bcnt].dual_n = strlen(bc[bcnt].dual); data/ea-utils-1.1.2+dfsg/fastq-multx.c:621: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). bc[bcnt].id.n=strlen(bc[bcnt].id.s); data/ea-utils-1.1.2+dfsg/fastq-multx.c:622: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). bc[bcnt].seq.n=strlen(bc[bcnt].seq.s); data/ea-utils-1.1.2+dfsg/fastq-multx.c:759:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). bc[b].out[i]=(char *) malloc(strlen(out[i])+strlen(bc[b].id.s)+100); data/ea-utils-1.1.2+dfsg/fastq-multx.c:759:48: [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). bc[b].out[i]=(char *) malloc(strlen(out[i])+strlen(bc[b].id.s)+100); data/ea-utils-1.1.2+dfsg/fastq-multx.c:760:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(bc[b].out[i], out[i], p-out[i]); data/ea-utils-1.1.2+dfsg/fastq-multx.c:897:29: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. } else if (d <= mismatch) { data/ea-utils-1.1.2+dfsg/fastq-multx.c:1015: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). grs[grcnt].id=(char *)malloc(strlen(s)+1); data/ea-utils-1.1.2+dfsg/fastq-multx.c:1031: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). bc[bcnt].id.n=strlen(bc[bcnt].id.s); data/ea-utils-1.1.2+dfsg/fastq-multx.c:1032: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). bc[bcnt].seq.n=strlen(bc[bcnt].seq.s); data/ea-utils-1.1.2+dfsg/knetfile.c:236:30: [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). netwrite(ftp->ctrl_fd, cmd, strlen(cmd)); data/ea-utils-1.1.2+dfsg/knetfile.c:309:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fp->host, fn + 6, l); data/ea-utils-1.1.2+dfsg/knetfile.c:310: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). fp->retr = calloc(strlen(p) + 8, 1); data/ea-utils-1.1.2+dfsg/knetfile.c:312: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). fp->size_cmd = calloc(strlen(p) + 8, 1); data/ea-utils-1.1.2+dfsg/knetfile.c:381:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fp->http_host, fn + 7, l); data/ea-utils-1.1.2+dfsg/knetfile.c:520:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). curr = read(fp->fd, buf + l, rest); data/ea-utils-1.1.2+dfsg/kprobaln.c:269: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). l_ref = strlen((char*)ref); l_query = strlen((char*)query); data/ea-utils-1.1.2+dfsg/kprobaln.c:269:40: [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_ref = strlen((char*)ref); l_query = strlen((char*)query); data/ea-utils-1.1.2+dfsg/kstring.c:58: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(s); data/ea-utils-1.1.2+dfsg/kstring.c:161: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). return (char*)kmemmem(str, strlen(str), pat, strlen(pat), _prep); data/ea-utils-1.1.2+dfsg/kstring.c:161:47: [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 (char*)kmemmem(str, strlen(str), pat, strlen(pat), _prep); data/ea-utils-1.1.2+dfsg/kstring.c:166: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). return (char*)kmemmem(str, n, pat, strlen(pat), _prep); data/ea-utils-1.1.2+dfsg/padding.c:338: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). assert(strlen(old->text) == strlen(header->text)); data/ea-utils-1.1.2+dfsg/padding.c:338:30: [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). assert(strlen(old->text) == strlen(header->text)); data/ea-utils-1.1.2+dfsg/padding.c:356:4: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(newtext, text, end - text + 1); data/ea-utils-1.1.2+dfsg/padding.c:362: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). assert (strlen(header->text) <= strlen(old->text)); data/ea-utils-1.1.2+dfsg/padding.c:362:34: [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). assert (strlen(header->text) <= strlen(old->text)); data/ea-utils-1.1.2+dfsg/padding.c:363: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(header->text) < header->l_text) { data/ea-utils-1.1.2+dfsg/padding.c:366: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). newtext = malloc(strlen(header->text) + 1); data/ea-utils-1.1.2+dfsg/padding.c:370: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). header->l_text = strlen(newtext); data/ea-utils-1.1.2+dfsg/padding.c:388:2: [1] (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 character. strcpy(in_mode, "r"); strcpy(out_mode, "w"); data/ea-utils-1.1.2+dfsg/padding.c:388:24: [1] (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 character. strcpy(in_mode, "r"); strcpy(out_mode, "w"); data/ea-utils-1.1.2+dfsg/padding.c:403:16: [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. if (is_bamin) strcat(in_mode, "b"); data/ea-utils-1.1.2+dfsg/padding.c:404:17: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. if (is_bamout) strcat(out_mode, "b"); data/ea-utils-1.1.2+dfsg/padding.c:405:2: [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(out_mode, "h"); data/ea-utils-1.1.2+dfsg/phase.c:562: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 *s = malloc(strlen(g.pre) + 20); data/ea-utils-1.1.2+dfsg/razf.c:124:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, &rz->index->size, sizeof(int)); data/ea-utils-1.1.2+dfsg/razf.c:133:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, rz->index->bin_offsets, sizeof(int64_t) * v32); data/ea-utils-1.1.2+dfsg/razf.c:139:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, rz->index->cell_offsets, sizeof(int) * rz->index->size); data/ea-utils-1.1.2+dfsg/razf.c:178:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy((char*)rz->header->extra, "RAZF", 4); data/ea-utils-1.1.2+dfsg/razf.c:375:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(rz->filedes, rz->inbuf, RZ_BUFFER_SIZE); data/ea-utils-1.1.2+dfsg/razf.c:422:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, &end, sizeof(int64_t)); data/ea-utils-1.1.2+dfsg/razf.c:430:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, &end, sizeof(int64_t)); data/ea-utils-1.1.2+dfsg/razf.c:572:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(rz->filedes, data, size); data/ea-utils-1.1.2+dfsg/razf.c:586:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rz->stream->avail_in = read(rz->filedes, rz->inbuf, rz->end -rz->in); data/ea-utils-1.1.2+dfsg/razf.c:592:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rz->stream->avail_in = read(rz->filedes, rz->inbuf, RZ_BUFFER_SIZE); data/ea-utils-1.1.2+dfsg/razip.c:82:32: [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 *name = malloc(sizeof(strlen(argv[optind]) + 5)); data/ea-utils-1.1.2+dfsg/razip.c:95:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((c = read(f_src, buffer, WINDOW_SIZE)) > 0) razf_write(rz, buffer, c); data/ea-utils-1.1.2+dfsg/razip.c:114: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). if (strstr(argv[optind], ".rz") - argv[optind] != strlen(argv[optind]) - 3) { data/ea-utils-1.1.2+dfsg/razip.c:119: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). name[strlen(name) - 3] = '\0'; data/ea-utils-1.1.2+dfsg/sam-stats.cpp:305:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c=getc(f); ungetc(c,f); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:366:6: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c=getc(f); ungetc(c,f); data/ea-utils-1.1.2+dfsg/sam-stats.cpp:922: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). dostats(d[S_ID],strlen(d[S_READ]),atoi(d[S_BITS]),d[S_NMO],atoi(d[S_POS]),atoi(d[S_MAPQ]),d[S_MATEREF],atoi(d[S_MATE]),d[S_READ],d[S_QUAL],nm, ins, del); data/ea-utils-1.1.2+dfsg/sam.c:34:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(header->text + header->l_text, text, len); // we cannot use strcpy() here. data/ea-utils-1.1.2+dfsg/sam.c:145: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). int l = strlen(s); data/ea-utils-1.1.2+dfsg/sam.c:172: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). fn_list = calloc(strlen(fn_ref) + 5, 1); data/ea-utils-1.1.2+dfsg/sam_header.c:531:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen(tag->value) + 1; // \t data/ea-utils-1.1.2+dfsg/sam_header.c:533:24: [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(tag->value) + 3; // XY: data/ea-utils-1.1.2+dfsg/sam_header.c:552:21: [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. nout += sprintf(out+nout,"\t"); data/ea-utils-1.1.2+dfsg/sam_header.c:559:17: [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. nout += sprintf(out+nout,"\n"); data/ea-utils-1.1.2+dfsg/tidx/tidx-lib.cpp:241:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool tidx::read(const char *in) { data/ea-utils-1.1.2+dfsg/tidx/tidx.h:18:38: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). tidx(const char *path) {init(); read(path);}; data/ea-utils-1.1.2+dfsg/tidx/tidx.h:24:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool read(const char *path); data/ea-utils-1.1.2+dfsg/varcall.cpp:1535:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!AnnotDex.read(path)) { ANALYSIS SUMMARY: Hits = 468 Lines analyzed = 18188 in approximately 0.64 seconds (28275 lines/second) Physical Source Lines of Code (SLOC) = 15230 Hits@level = [0] 635 [1] 126 [2] 254 [3] 24 [4] 64 [5] 0 Hits@level+ = [0+] 1103 [1+] 468 [2+] 342 [3+] 88 [4+] 64 [5+] 0 Hits/KSLOC@level+ = [0+] 72.4228 [1+] 30.7288 [2+] 22.4557 [3+] 5.77807 [4+] 4.20223 [5+] 0 Symlinks skipped = 4 (--allowlink overrides but see doc for security issue) 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.