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/wtdbg2-2.5/best_sam_hits4longreads.c Examining data/wtdbg2-2.5/bit2vec.h Examining data/wtdbg2-2.5/bitsvec.h Examining data/wtdbg2-2.5/bitvec.h Examining data/wtdbg2-2.5/chararray.h Examining data/wtdbg2-2.5/dagcns.h Examining data/wtdbg2-2.5/dbgcns.h Examining data/wtdbg2-2.5/dna.h Examining data/wtdbg2-2.5/filereader.h Examining data/wtdbg2-2.5/filewriter.h Examining data/wtdbg2-2.5/general_graph.h Examining data/wtdbg2-2.5/hashset.h Examining data/wtdbg2-2.5/kbm.c Examining data/wtdbg2-2.5/kbm.h Examining data/wtdbg2-2.5/kbmpoa.h Examining data/wtdbg2-2.5/ksw.h Examining data/wtdbg2-2.5/kswx.h Examining data/wtdbg2-2.5/list.h Examining data/wtdbg2-2.5/mem_share.h Examining data/wtdbg2-2.5/pgzf.c Examining data/wtdbg2-2.5/pgzf.h Examining data/wtdbg2-2.5/queue.h Examining data/wtdbg2-2.5/sort.h Examining data/wtdbg2-2.5/thread.h Examining data/wtdbg2-2.5/tripoa.h Examining data/wtdbg2-2.5/txtplot.h Examining data/wtdbg2-2.5/wtdbg-cns.c Examining data/wtdbg2-2.5/wtdbg-graph.h Examining data/wtdbg2-2.5/wtdbg.c Examining data/wtdbg2-2.5/wtdbg.h Examining data/wtdbg2-2.5/wtpoa-cns.c Examining data/wtdbg2-2.5/wtpoa.h Examining data/wtdbg2-2.5/ksw.c Examining data/wtdbg2-2.5/poacns.h FINAL RESULTS: data/wtdbg2-2.5/filereader.h:164:27: [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 = fc->_file = popen(fc->filename, "r"); data/wtdbg2-2.5/filereader.h:473:26: [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 = fc->_file = popen(fc->filename, "r"); data/wtdbg2-2.5/mem_share.h:387:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullname, "%s/%s", realpath, filename); data/wtdbg2-2.5/mem_share.h:512:10: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while((fscanf(fp, "%s", buffer)) > 0){ data/wtdbg2-2.5/mem_share.h:532:10: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. while((fscanf(fp, "%s", buffer)) > 0){ data/wtdbg2-2.5/mem_share.h:1174: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(mem_share_locks + mem_share_lock_size, file); data/wtdbg2-2.5/mem_share.h:1311:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(shadow, "%s.mem_share.%s.%ld.shm", shmp, hostname, gethostid()); data/wtdbg2-2.5/mem_share.h:1335:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(lock, "%s.mem_share.%s.%ld", shmp, hostname, gethostid()); data/wtdbg2-2.5/mem_share.h:1364:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(shadow, "%s.mem_share.%s.%ld.shm", shmp, hostname, gethostid()); data/wtdbg2-2.5/mem_share.h:1370:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(lock, "%s.mem_share.%s.%ld", shmp, hostname, gethostid()); data/wtdbg2-2.5/mem_share.h:1394:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(lock, "%s.mem_share.%s.%ld", shmp, hostname, gethostid()); data/wtdbg2-2.5/mem_share.h:1411:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(shadow, "%s.mem_share.%s.%ld.shm", shmp, hostname, gethostid()); data/wtdbg2-2.5/pgzf.c:124:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(ftag, "%s/%s", outf, rtag); data/wtdbg2-2.5/pgzf.c:154:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(ftag, "%s/%s", outf, rtag); data/wtdbg2-2.5/pgzf.c:195:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(ftag, "%s/%s.gz", outf, rtag); data/wtdbg2-2.5/pgzf.c:204:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(ftag, "%s.gz", argv[c]); data/wtdbg2-2.5/pgzf.c:216:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(ftag, "%s.gz", argv[optind]); data/wtdbg2-2.5/pgzf.c:224:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(ftag, "%s/%s.gz", outf, rtag); data/wtdbg2-2.5/wtdbg-graph.h:4948:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(file, "%s%s", prefix, suffix? suffix : ""); data/wtdbg2-2.5/best_sam_hits4longreads.c:72:13: [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, "hvBl:f:")) != -1){ data/wtdbg2-2.5/dna.h:221:45: [3] (random) lrand48: 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(beg_seq2kmers_v == 4) beg_seq2kmers_v = lrand48() & 0x03; \ data/wtdbg2-2.5/dna.h:226:45: [3] (random) lrand48: 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(beg_seq2kmers_v == 4) beg_seq2kmers_v = lrand48() & 0x03; \ data/wtdbg2-2.5/dna.h:235:51: [3] (random) lrand48: 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(beg_seq2revkmers_v == 4) beg_seq2revkmers_v = lrand48() & 0x03; \ data/wtdbg2-2.5/dna.h:240:51: [3] (random) lrand48: 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(beg_seq2revkmers_v == 4) beg_seq2revkmers_v = lrand48() & 0x03; \ data/wtdbg2-2.5/dna.h:297:18: [3] (random) lrand48: 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(c == 4) c = lrand48() & 0x03; data/wtdbg2-2.5/dna.h:306:18: [3] (random) lrand48: 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(c == 4) c = lrand48(); data/wtdbg2-2.5/dna.h:715:18: [3] (random) lrand48: 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(c == 4) c = lrand48() & 0x03; data/wtdbg2-2.5/dna.h:730:18: [3] (random) lrand48: 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(c == 4) c = lrand48() & 0x03; data/wtdbg2-2.5/kbm.c:251:13: [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, "hi:d:o:fIt:k:p:K:E:O:S:B:G:D:X:Y:Z:x:y:z:l:m:n:s:cr:CT:W:R:qvV")) != -1){ data/wtdbg2-2.5/ksw.c:635: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, "a:b:q:r:ft:1")) >= 0) { data/wtdbg2-2.5/mem_share.h:287:8: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. char *realpath; data/wtdbg2-2.5/mem_share.h:291:10: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(stat(realpath, &s) == -1){ free(realpath); return 0; } data/wtdbg2-2.5/mem_share.h:291:37: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(stat(realpath, &s) == -1){ free(realpath); return 0; } data/wtdbg2-2.5/mem_share.h:292:7: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. free(realpath); data/wtdbg2-2.5/mem_share.h:306:8: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. char *realpath; data/wtdbg2-2.5/mem_share.h:310:10: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(stat(realpath, &s) == -1){ free(realpath); return 0; } data/wtdbg2-2.5/mem_share.h:310:37: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(stat(realpath, &s) == -1){ free(realpath); return 0; } data/wtdbg2-2.5/mem_share.h:311:7: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. free(realpath); data/wtdbg2-2.5/mem_share.h:382:8: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. char *realpath, *fullname; data/wtdbg2-2.5/mem_share.h:385:17: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(!dir_exists(realpath)){ free(realpath); return 0; } data/wtdbg2-2.5/mem_share.h:385:34: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(!dir_exists(realpath)){ free(realpath); return 0; } data/wtdbg2-2.5/mem_share.h:386:27: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. fullname = malloc(strlen(realpath) + strlen(filename) + 3); data/wtdbg2-2.5/mem_share.h:387:29: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. sprintf(fullname, "%s/%s", realpath, filename); data/wtdbg2-2.5/mem_share.h:388:7: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. free(realpath); data/wtdbg2-2.5/mem_share.h:610:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. val = getenv("LIMIT_RSS"); data/wtdbg2-2.5/mem_share.h:616:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. val = getenv("LIMIT_RTIME"); data/wtdbg2-2.5/pgzf.c:65:13: [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, "hdxft:b:l:o:V")) != -1){ data/wtdbg2-2.5/tripoa.h:308:27: [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. push_f4v(kords, 100.0 * drand48()); data/wtdbg2-2.5/wtdbg-cns.c:470:13: [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, "hvVt:k:i:o:fj:Z:W:C:M:X:I:D:E:H:L:m:c:S:")) != -1){ data/wtdbg2-2.5/wtdbg.c:492:13: [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, "ht:i:fo:x:E:k:p:K:S:l:m:s:RvqVe:L:Ag:X:", prog_opts, &opt_idx)) != -1){ data/wtdbg2-2.5/wtpoa-cns.c:106:13: [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, "hqvVt:d:rp:u:i:o:fj:S:B:W:w:Ab:M:X:I:D:E:H:R:c:C:F:N:x:")) != -1){ data/wtdbg2-2.5/best_sam_hits4longreads.c:74: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 'l': minlen = atoi(optarg); break; data/wtdbg2-2.5/best_sam_hits4longreads.c:112:17: [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). reflen = atol(str + 3); data/wtdbg2-2.5/best_sam_hits4longreads.c:142:16: [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). hit->flag = atol(get_col_str(fr, 1)); data/wtdbg2-2.5/best_sam_hits4longreads.c:159: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). tb = atoi(get_col_str(fr, 3)); data/wtdbg2-2.5/bitvec.h:511: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(clone, bitv, sizeof(BitVec)); data/wtdbg2-2.5/bitvec.h:514: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(clone->bits, bitv->bits, (bitv->n_cap / 64) * 8); data/wtdbg2-2.5/bitvec.h:518: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(clone->sums, bitv->sums, (bitv->sum_size * 2 + 1) * 8); data/wtdbg2-2.5/bitvec.h:523: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(clone->hash, bitv->hash, bitv->hash_size * 8); data/wtdbg2-2.5/chararray.h:134: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 + len, s, inc + 1); data/wtdbg2-2.5/chararray.h:180: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(str->string + str->size, src, offlen); data/wtdbg2-2.5/chararray.h:194: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(str->string, chs, len); data/wtdbg2-2.5/dagcns.h:270:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *colors[2][2] = {{"blue", "green"}, {"red", "gray"}}; data/wtdbg2-2.5/dagcns.h:563:6: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int open; data/wtdbg2-2.5/dagcns.h:590:6: [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(open < 0){ data/wtdbg2-2.5/dagcns.h:596:21: [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). } else if(dn && (open || be->cigar == 1)){ data/wtdbg2-2.5/dagcns.h:804:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[100]; data/wtdbg2-2.5/dbgcns.h:315: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 seq[DBGCNS_KMER_MAX_SIZE + 1]; data/wtdbg2-2.5/dbgcns.h:1230: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 kstr[64]; data/wtdbg2-2.5/dna.h:78:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char bit_base_table[12] = "ACGTN-acgtn*"; data/wtdbg2-2.5/dna.h:79:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char bit4_base_table[16] = "-ACMGRSVTWYHKDBN"; data/wtdbg2-2.5/dna.h:203: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 seq[33]; data/wtdbg2-2.5/dna.h:209: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 seq[33]; data/wtdbg2-2.5/dna.h:776: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(bnk->bits + (rsize >> 5), bnk->bits + 0, (rsize >> 5) << 3); data/wtdbg2-2.5/dna.h:783: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[101]; data/wtdbg2-2.5/dna.h:825: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[65]; data/wtdbg2-2.5/dna.h:1204: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(ptr, tag, tag_len); data/wtdbg2-2.5/dna.h:1221: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(ptr, tag, tag_len); data/wtdbg2-2.5/dna.h:1238: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(ptr, tag, tag_len); data/wtdbg2-2.5/filereader.h:78:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *buffer[2]; data/wtdbg2-2.5/filereader.h:149:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fr->buffer[fr->widx], fc->filename + off, cnt); data/wtdbg2-2.5/filewriter.h: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 *buffs[2]; data/wtdbg2-2.5/general_graph.h:360:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *colors[2][2] = {{"blue", "green"}, {"red", "gray"}}; data/wtdbg2-2.5/kbm.c:219: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 regtag[14]; data/wtdbg2-2.5/kbm.c:256:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'L': tidy_reads = atoi(optarg); break; data/wtdbg2-2.5/kbm.c:260: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 't': ncpu = atoi(optarg); break; data/wtdbg2-2.5/kbm.c:261:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'k': par->ksize = atoi(optarg); opt_flags |= (1 << 1); break; data/wtdbg2-2.5/kbm.c:262:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'p': par->psize = atoi(optarg); opt_flags |= (1 << 0); break; data/wtdbg2-2.5/kbm.c:264: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 'E': par->kmin = atoi(optarg); break; data/wtdbg2-2.5/kbm.c:265:36: [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 'O': par->min_bin_degree = atoi(optarg); break; data/wtdbg2-2.5/kbm.c:267: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). case 'B': par->ksampling = atoi(optarg); break; data/wtdbg2-2.5/kbm.c:268:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'G': solid_kmer = atoi(optarg); break; data/wtdbg2-2.5/kbm.c:269: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). case 'D': par->strand_mask = atoi(optarg); break; data/wtdbg2-2.5/kbm.c:270: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). case 'X': par->max_bgap = atoi(optarg); break; data/wtdbg2-2.5/kbm.c:271: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). case 'Y': par->max_bvar = atoi(optarg); break; data/wtdbg2-2.5/kbm.c:273: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 'x': par->pgap = atoi(optarg); break; data/wtdbg2-2.5/kbm.c:274: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 'y': par->pvar = atoi(optarg); break; data/wtdbg2-2.5/kbm.c:275: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 'z': refine = atoi(optarg); break; data/wtdbg2-2.5/kbm.c:276: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 'l': par->min_aln = atoi(optarg) / KBM_BIN_SIZE; break; data/wtdbg2-2.5/kbm.c:277: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 'm': par->min_mat = atoi(optarg); break; data/wtdbg2-2.5/kbm.c:278: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 'n': par->max_hit = atoi(optarg); break; data/wtdbg2-2.5/kbm.c:284: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). case 'T': par->test_mode = atoi(optarg); break; data/wtdbg2-2.5/kbm.c:296: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). devnull = open("/dev/null", O_WRONLY); data/wtdbg2-2.5/kbm.c:338: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). if(optind + 1 < argc) tree_maxcnt = atoi(argv[optind + 1]); data/wtdbg2-2.5/kbm.c:447:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(regtag, "S%010llu", (u8i)kbm->reads->size); data/wtdbg2-2.5/kbm.h:398: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(ptr, tag, taglen); data/wtdbg2-2.5/kbm.h:420: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(ptr, tag, taglen); data/wtdbg2-2.5/kbm.h:1591:53: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static inline void print_exists_index_kbm(KBM *kbm, char *qtag, BaseBank *rdseqs, u8i seqoff, u4i seqlen, kmeroffv *kmers[2], FILE *out){ data/wtdbg2-2.5/ksw.c:606: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 seq_nt4_table[256] = { data/wtdbg2-2.5/ksw.c:637: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). case 'a': sa = atoi(optarg); break; data/wtdbg2-2.5/ksw.c:638: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). case 'b': sb = atoi(optarg); break; data/wtdbg2-2.5/ksw.c:639: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': gapo = atoi(optarg); break; data/wtdbg2-2.5/ksw.c:640: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 'r': gape = atoi(optarg); break; data/wtdbg2-2.5/ksw.c:641: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 't': minsc = atoi(optarg); break; data/wtdbg2-2.5/kswx.h:1395: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. static inline void kswx_polish_pairwise(char *alns[2], int len){ data/wtdbg2-2.5/kswx.h:1419:60: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static inline uint32_t kswx_pairwise2cigar(u32list *cigar, char *alns[2], uint32_t size){ data/wtdbg2-2.5/list.h:371: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(list->buffer + idx, es, size * sizeof(e_type)); \ data/wtdbg2-2.5/list.h:439: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(list1->buffer + list1->size, list2->buffer, sizeof(e_type) * list2->size); \ data/wtdbg2-2.5/list.h:446: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(list1->buffer + list1->size, ary, sizeof(e_type) * size); \ data/wtdbg2-2.5/mem_share.h:160: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. static inline void num2bits(u8i num, char bits[64]){ data/wtdbg2-2.5/mem_share.h:403:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(full_name, name, strlen(name)); data/wtdbg2-2.5/mem_share.h:404:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(full_name + strlen(name), suffix, strlen(suffix) + 1); data/wtdbg2-2.5/mem_share.h:409: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). file = fopen(full_name, "r"); data/wtdbg2-2.5/mem_share.h:428:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(full_name, name, strlen(name)); data/wtdbg2-2.5/mem_share.h:429:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(full_name + strlen(name), suffix, strlen(suffix) + 1); data/wtdbg2-2.5/mem_share.h:436: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). file = fopen(full_name, "w+"); data/wtdbg2-2.5/mem_share.h:455:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(full_name, name, strlen(name)); data/wtdbg2-2.5/mem_share.h:456:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(full_name + strlen(name), suffix, strlen(suffix) + 1); data/wtdbg2-2.5/mem_share.h:461: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). file = fopen(full_name, "a+"); data/wtdbg2-2.5/mem_share.h:506:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[64]; data/wtdbg2-2.5/mem_share.h:545: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 str[64]; data/wtdbg2-2.5/mem_share.h:553: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(str, "/proc/%u/stat", getpid()); data/wtdbg2-2.5/mem_share.h:612:15: [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). rss_limit = atol(val) * 1024 * 1024; data/wtdbg2-2.5/mem_share.h:618:17: [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). rtime_limit = atol(val); data/wtdbg2-2.5/mem_share.h:829: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(*ret, obj, desc->size * cnt); data/wtdbg2-2.5/mem_share.h:842: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(chd, ref, desc->size); data/wtdbg2-2.5/mem_share.h:1183:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((file = fopen(path, "r")) == NULL){ data/wtdbg2-2.5/mem_share.h:1214:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((file = fopen(path, "r")) == NULL){ data/wtdbg2-2.5/mem_share.h:1248:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((file = fopen(path, "r")) == NULL){ data/wtdbg2-2.5/mem_share.h:1287: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 hostname[65]; data/wtdbg2-2.5/mem_share.h:1294:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if((file = fopen(path, "r+")) == NULL){ data/wtdbg2-2.5/mem_share.h:1358: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 hostname[65]; data/wtdbg2-2.5/mem_share.h:1383: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 hostname[65]; data/wtdbg2-2.5/pgzf.c:69: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 't': ncpu = atoi(optarg); break; data/wtdbg2-2.5/pgzf.c:70:25: [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': bufsize = (atol(optarg) << 20); break; data/wtdbg2-2.5/pgzf.c:71: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': level = atoi(optarg); break; data/wtdbg2-2.5/pgzf.h:784: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(dat + off, pgz->dst->buffer + pgz->doff, len - off); data/wtdbg2-2.5/pgzf.h:790: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(dat + off, pgz->dst->buffer + pgz->doff, pgz->dst->size - pgz->doff); data/wtdbg2-2.5/poacns.h:136: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(g->par, &par, sizeof(POGPar)); data/wtdbg2-2.5/poacns.h:892: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(row2 + beg[0], row1 + beg[0], sz * sizeof(b2i)); data/wtdbg2-2.5/poacns.h:893: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(btd2 + beg[0], btd1 + beg[0], sz * sizeof(b2i)); data/wtdbg2-2.5/poacns.h:900: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(row2 + end[2], row1 + end[2], sz * sizeof(b2i)); data/wtdbg2-2.5/poacns.h:901: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(btd2 + end[2], btd1 + end[2], sz * sizeof(b2i)); data/wtdbg2-2.5/poacns.h:908: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(row2 + b, row1 + b, sz * sizeof(b2i)); data/wtdbg2-2.5/poacns.h:909: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(btd2 + b, btd1 + b, sz * sizeof(b2i)); data/wtdbg2-2.5/poacns.h:914: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(row2 + b, row1 + b, sz * sizeof(b2i)); data/wtdbg2-2.5/poacns.h:915: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(btd2 + b, btd1 + b, sz * sizeof(b2i)); data/wtdbg2-2.5/poacns.h:925: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(row2 + b, row1 + b, sz * sizeof(b2i)); data/wtdbg2-2.5/poacns.h:926: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(btd2 + b, btd1 + b, sz * sizeof(b2i)); data/wtdbg2-2.5/poacns.h:932: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(row2 + b, row1 + b, sz * sizeof(b2i)); data/wtdbg2-2.5/poacns.h:933: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(btd2 + b, btd1 + b, sz * sizeof(b2i)); data/wtdbg2-2.5/poacns.h:1275: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(g->btvs->buffer + u->voff, g->btds->buffer + u->coff + u->rbeg, (u->rend - u->rbeg) * sizeof(u2i)); data/wtdbg2-2.5/poacns.h:1552: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(g->msa->buffer + g->msa_len * ridx, g->msa->buffer + g->msa_len * g->seqs->nseq, g->msa_len); data/wtdbg2-2.5/wtdbg-cns.c:473: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 't': ncpu = atoi(optarg); break; data/wtdbg2-2.5/wtdbg-cns.c:474: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 'k': ksize = atoi(optarg); break; data/wtdbg2-2.5/wtdbg-cns.c:478: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 'j': reglen = atoi(optarg); break; data/wtdbg2-2.5/wtdbg-cns.c:479:18: [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 'Z': Z = atoi(optarg); break; data/wtdbg2-2.5/wtdbg-cns.c:480:18: [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': W = atoi(optarg); break; data/wtdbg2-2.5/wtdbg-cns.c:481:18: [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': C = atoi(optarg); break; data/wtdbg2-2.5/wtdbg-cns.c:482:18: [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': M = atoi(optarg); break; data/wtdbg2-2.5/wtdbg-cns.c:483:18: [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': X = atoi(optarg); break; data/wtdbg2-2.5/wtdbg-cns.c:484:18: [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': I = atoi(optarg); break; data/wtdbg2-2.5/wtdbg-cns.c:485:18: [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': D = atoi(optarg); break; data/wtdbg2-2.5/wtdbg-cns.c:486:18: [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 'E': E = atoi(optarg); break; data/wtdbg2-2.5/wtdbg-cns.c:487:18: [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 'H': H = atoi(optarg); break; data/wtdbg2-2.5/wtdbg-cns.c:488:18: [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': L = atoi(optarg); break; data/wtdbg2-2.5/wtdbg-cns.c:489: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 'm': cns_model = atoi(optarg); break; data/wtdbg2-2.5/wtdbg-cns.c:490: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). case 'c': candidate_mode = atoi(optarg); break; data/wtdbg2-2.5/wtdbg-cns.c:491: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 'S': corr_struct = atoi(optarg); break; data/wtdbg2-2.5/wtdbg-graph.h:4949: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). out = fopen(file, "w"); data/wtdbg2-2.5/wtdbg.c:378: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 *prefix, *rdtag_filter[2], *dump_seqs, *load_seqs, *dump_kbm, *load_kbm, *load_nodes, *load_clips; data/wtdbg2-2.5/wtdbg.c:379: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 regtag[14]; data/wtdbg2-2.5/wtdbg.c:494: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 't': ncpu = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:537:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'k': par->ksize = atoi(optarg); opt_flags |= (1 << 1); break; data/wtdbg2-2.5/wtdbg.c:538:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'p': par->psize = atoi(optarg); opt_flags |= (1 << 0); break; data/wtdbg2-2.5/wtdbg.c:540: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 'E': par->kmin = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:546:36: [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 2009: filter_rd_strategy = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:547: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). case 2005: par->max_bgap = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:548: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). case 2006: par->max_bvar = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:549:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 2007: par->pgap = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:550:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 2008: par->pvar = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:551: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 'l': par->min_aln = atoi(optarg) / KBM_BIN_SIZE; break; data/wtdbg2-2.5/wtdbg.c:552: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 'm': par->min_mat = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:566: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 'L': tidy_reads = atoi(optarg); opt_flags |= (1 << 4); break; data/wtdbg2-2.5/wtdbg.c:569: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). case 1003: max_bp = atol(optarg); break; data/wtdbg2-2.5/wtdbg.c:570:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 1035: num_index = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:571: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 1004: reglen = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:572: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 1005: regovl = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:574: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 'e': edge_cov = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:575:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 3009: edge_span = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:576: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 1007: node_cov = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:577: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). case 1008: max_node_cov = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:578:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 1009: ttr_n_cov = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:587: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). case 1014: par->strand_mask = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:588: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 1015: bub_step = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:589: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 1016: tip_step = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:590: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 1017: min_ctg_len = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:591: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 1018: min_ctg_nds = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:593: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). case 1020: par->min_bin_degree = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:594: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). case 1021: max_overhang = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:600: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 1027: bestn = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:601: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). case 1028: par->max_hit = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:602:32: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 1029: par->ksampling = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:604: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 3001: rpar->psize = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:606: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). case 3003: rpar->min_aln = atoi(optarg) / KBM_BIN_SIZE; break; data/wtdbg2-2.5/wtdbg.c:607: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). case 3004: rpar->min_mat = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:611: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 1031: min_bins = atoi(optarg); break; data/wtdbg2-2.5/wtdbg.c:695: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). devnull = open("/dev/null", O_WRONLY); data/wtdbg2-2.5/wtdbg.c:843:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(regtag, "S%010llu", (u8i)kbm->reads->size); data/wtdbg2-2.5/wtdbg.h:255:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *colors[2][2] = {{"blue", "green"}, {"red", "gray"}}; data/wtdbg2-2.5/wtdbg.h:1258: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). qlen = atoi(get_col_str(pws, 2)); data/wtdbg2-2.5/wtdbg.h:1268: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). hit->qb = atoi(get_col_str(pws, 3)) / KBM_BIN_SIZE; data/wtdbg2-2.5/wtdbg.h:1269: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). hit->qe = atoi(get_col_str(pws, 4)) / KBM_BIN_SIZE; data/wtdbg2-2.5/wtdbg.h:1281: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). hit->tb = atoi(get_col_str(pws, 8)) / KBM_BIN_SIZE; data/wtdbg2-2.5/wtdbg.h:1282: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). hit->te = atoi(get_col_str(pws, 9)) / KBM_BIN_SIZE; data/wtdbg2-2.5/wtdbg.h:1284:14: [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). hit->mat = atoi(get_col_str(pws, 10)); data/wtdbg2-2.5/wtdbg.h:1286:14: [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). hit->aln = atoi(get_col_str(pws, 11)) / KBM_BIN_SIZE; data/wtdbg2-2.5/wtdbg.h:1290:14: [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). hit->cnt = atoi(get_col_str(pws, 12)); data/wtdbg2-2.5/wtdbg.h:1291:14: [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). hit->gap = atoi(get_col_str(pws, 13)); data/wtdbg2-2.5/wtdbg.h:1519: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(mdbg->aux->par, g->par, sizeof(KBMPar)); data/wtdbg2-2.5/wtdbg.h:2175: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). rd->clps[0] = atoi(get_col_str(clp, 2)) / KBM_BIN_SIZE; data/wtdbg2-2.5/wtdbg.h:2176: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). rd->clps[1] = atoi(get_col_str(clp, 3)) / KBM_BIN_SIZE; data/wtdbg2-2.5/wtdbg.h:2182: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). nreg = atoi(get_col_str(nds, 1)); data/wtdbg2-2.5/wtdbg.h:2186:9: [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). nid = atol(get_col_str(nds, 0) + 1); data/wtdbg2-2.5/wtdbg.h:2217: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). reg->beg = atoi(str); data/wtdbg2-2.5/wtdbg.h:2219: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). reg->end = atoi(str); data/wtdbg2-2.5/wtdbg.h:2226: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). reg->end = atoi(tok); data/wtdbg2-2.5/wtdbg.h:2228: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). reg->beg = atoi(tok); data/wtdbg2-2.5/wtpoa-cns.c:109: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 't': ncpu = atoi(optarg); break; data/wtdbg2-2.5/wtpoa-cns.c:112: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 'u': flags = atoi(optarg); break; data/wtdbg2-2.5/wtpoa-cns.c:117: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 'j': reglen = atoi(optarg); break; data/wtdbg2-2.5/wtpoa-cns.c:118: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 'S': shuffle = atoi(optarg); break; data/wtdbg2-2.5/wtpoa-cns.c:131: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': winlen = atoi(optarg); break; data/wtdbg2-2.5/wtpoa-cns.c:132: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': winmin = atoi(optarg); break; data/wtdbg2-2.5/wtpoa-cns.c:134: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 'b': par.tribase = atoi(optarg); break; data/wtdbg2-2.5/wtpoa-cns.c:135: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 'M': par.M = atoi(optarg); break; data/wtdbg2-2.5/wtpoa-cns.c:136: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 'X': par.X = atoi(optarg); break; data/wtdbg2-2.5/wtpoa-cns.c:137: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 'I': par.I = atoi(optarg); break; data/wtdbg2-2.5/wtpoa-cns.c:138: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 'D': par.D = atoi(optarg); break; data/wtdbg2-2.5/wtpoa-cns.c:139: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 'E': par.E = atoi(optarg); break; data/wtdbg2-2.5/wtpoa-cns.c:141: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 'R': par.rW = atoi(optarg); break; data/wtdbg2-2.5/wtpoa-cns.c:142: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 'c': par.cnsmode = atoi(optarg); break; data/wtdbg2-2.5/wtpoa-cns.c:143:32: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 'C': par.msa_min_cnt = atoi(optarg); break; data/wtdbg2-2.5/wtpoa-cns.c:145: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 'N': seqmax = atoi(optarg); break; data/wtdbg2-2.5/wtpoa-cns.c:169: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). devnull = open("/dev/null", O_WRONLY); data/wtdbg2-2.5/wtpoa.h:854:14: [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). samflag = atoi(get_col_str(sb->fr, 1)); data/wtdbg2-2.5/wtpoa.h:871:10: [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). off = atol(get_col_str(sb->fr, 3)) - 1; data/wtdbg2-2.5/wtpoa.h:877:13: [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). rddir = (atol(get_col_str(sb->fr, 1)) & 0x10) >> 4; data/wtdbg2-2.5/wtpoa.h:1123: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). wb->blk->reflen = atol(ss); data/wtdbg2-2.5/wtpoa.h:1144: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). wb->key->rdoff = atoi(get_col_str(wb->fr, 3)); data/wtdbg2-2.5/wtpoa.h:1146: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). wb->key->rbeg = atoi(get_col_str(wb->fr, 6)); data/wtdbg2-2.5/wtpoa.h:1147: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). wb->key->rend = atoi(get_col_str(wb->fr, 7)); data/wtdbg2-2.5/wtpoa.h:1161: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(bk, ((WTLAYBlock*)obj)->blk, sizeof(lay_blk_t)); data/wtdbg2-2.5/best_sam_hits4longreads.c:8: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). u4i stroff, strlen; data/wtdbg2-2.5/best_sam_hits4longreads.c:115:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(reftag) && reflen){ data/wtdbg2-2.5/chararray.h:113: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). if(len < 0) len = strlen(string); data/wtdbg2-2.5/chararray.h:116:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str, string, len); data/wtdbg2-2.5/chararray.h:132: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). inc = strlen(s); data/wtdbg2-2.5/chararray.h:203:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(chs); data/wtdbg2-2.5/filereader.h:144: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). len = strlen(fc->filename); data/wtdbg2-2.5/filereader.h:307: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). len = filename? strlen(filename) : 0; data/wtdbg2-2.5/filereader.h:314:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(f->filename, filename, len - 1); data/wtdbg2-2.5/filereader.h:378: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). len = str? strlen(str) : 0; data/wtdbg2-2.5/filereader.h:514:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((ch = fgetc(stdin)) != EOF){ data/wtdbg2-2.5/kbmpoa.h:77:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). append_string(kb->rdtag, rdtag, strlen(rdtag)); data/wtdbg2-2.5/kbmpoa.h:79:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). append_string(kb->rdtag, "anonymous", strlen("anonymous")); data/wtdbg2-2.5/mem_share.h:327: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). ptr = filename + strlen(filename); data/wtdbg2-2.5/mem_share.h:341: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). path = malloc(strlen(cwd) + strlen(filename) + 2); data/wtdbg2-2.5/mem_share.h:341: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). path = malloc(strlen(cwd) + strlen(filename) + 2); data/wtdbg2-2.5/mem_share.h:360: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). i = strlen(cwd); data/wtdbg2-2.5/mem_share.h:373:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(path, cwd, i); data/wtdbg2-2.5/mem_share.h:376:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(path + i + 1, filename + y, strlen(filename) - y); data/wtdbg2-2.5/mem_share.h:376: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). strncpy(path + i + 1, filename + y, strlen(filename) - y); data/wtdbg2-2.5/mem_share.h:377: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). path[i + 1 + strlen(filename) - y] = 0; data/wtdbg2-2.5/mem_share.h:386: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). fullname = malloc(strlen(realpath) + strlen(filename) + 3); data/wtdbg2-2.5/mem_share.h:386:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fullname = malloc(strlen(realpath) + strlen(filename) + 3); data/wtdbg2-2.5/mem_share.h:402: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). full_name = (char*)alloca(strlen(name) + strlen(suffix) + 1); data/wtdbg2-2.5/mem_share.h:402:44: [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). full_name = (char*)alloca(strlen(name) + strlen(suffix) + 1); data/wtdbg2-2.5/mem_share.h:403: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). memcpy(full_name, name, strlen(name)); data/wtdbg2-2.5/mem_share.h:404: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). memcpy(full_name + strlen(name), suffix, strlen(suffix) + 1); data/wtdbg2-2.5/mem_share.h:404:44: [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). memcpy(full_name + strlen(name), suffix, strlen(suffix) + 1); data/wtdbg2-2.5/mem_share.h:427: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). full_name = (char*)alloca(strlen(name) + strlen(suffix) + 1); data/wtdbg2-2.5/mem_share.h:427:44: [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). full_name = (char*)alloca(strlen(name) + strlen(suffix) + 1); data/wtdbg2-2.5/mem_share.h:428: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). memcpy(full_name, name, strlen(name)); data/wtdbg2-2.5/mem_share.h:429: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). memcpy(full_name + strlen(name), suffix, strlen(suffix) + 1); data/wtdbg2-2.5/mem_share.h:429:44: [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). memcpy(full_name + strlen(name), suffix, strlen(suffix) + 1); data/wtdbg2-2.5/mem_share.h:454: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). full_name = (char*)alloca(strlen(name) + strlen(suffix) + 1); data/wtdbg2-2.5/mem_share.h:454:44: [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). full_name = (char*)alloca(strlen(name) + strlen(suffix) + 1); data/wtdbg2-2.5/mem_share.h:455: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). memcpy(full_name, name, strlen(name)); data/wtdbg2-2.5/mem_share.h:456: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). memcpy(full_name + strlen(name), suffix, strlen(suffix) + 1); data/wtdbg2-2.5/mem_share.h:456:44: [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). memcpy(full_name + strlen(name), suffix, strlen(suffix) + 1); data/wtdbg2-2.5/mem_share.h:556:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fp)) != EOF) { data/wtdbg2-2.5/mem_share.h:564:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fp)) != EOF) { data/wtdbg2-2.5/mem_share.h:783:95: [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). static inline size_t _char_array_obj_desc_cnt(void *obj, int idx){ if(idx == 0 && obj) return strlen((char*)obj) + 1; else return 0; } data/wtdbg2-2.5/mem_share.h:1136: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). off += strlen(mem_share_locks + off) + 1; data/wtdbg2-2.5/mem_share.h:1172:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(file); data/wtdbg2-2.5/mem_share.h:1310: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). shadow = alloca(strlen(shmp) + strlen(hostname) + 40); data/wtdbg2-2.5/mem_share.h:1310: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). shadow = alloca(strlen(shmp) + strlen(hostname) + 40); data/wtdbg2-2.5/mem_share.h:1334: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). lock = alloca(strlen(shmp) + strlen(hostname) + 20); data/wtdbg2-2.5/mem_share.h:1334: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). lock = alloca(strlen(shmp) + strlen(hostname) + 20); data/wtdbg2-2.5/mem_share.h:1363: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). shadow = alloca(strlen(shmp) + strlen(hostname) + 40); data/wtdbg2-2.5/mem_share.h:1363: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). shadow = alloca(strlen(shmp) + strlen(hostname) + 40); data/wtdbg2-2.5/mem_share.h:1369: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). lock = alloca(strlen(shmp) + strlen(hostname) + 20); data/wtdbg2-2.5/mem_share.h:1369: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). lock = alloca(strlen(shmp) + strlen(hostname) + 20); data/wtdbg2-2.5/mem_share.h:1393: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). lock = alloca(strlen(shmp) + strlen(hostname) + 32); data/wtdbg2-2.5/mem_share.h:1393: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). lock = alloca(strlen(shmp) + strlen(hostname) + 32); data/wtdbg2-2.5/mem_share.h:1410: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). shadow = alloca(strlen(shmp) + strlen(hostname) + 40); data/wtdbg2-2.5/mem_share.h:1410: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). shadow = alloca(strlen(shmp) + strlen(hostname) + 40); data/wtdbg2-2.5/pgzf.c:116: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(argv[c]) < 4 || strcasecmp(argv[c] + strlen(argv[c]) - 3, ".gz")){ data/wtdbg2-2.5/pgzf.c:116:52: [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(argv[c]) < 4 || strcasecmp(argv[c] + strlen(argv[c]) - 3, ".gz")){ data/wtdbg2-2.5/pgzf.c:122: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). rtag[strlen(rtag) - 3] = 0; data/wtdbg2-2.5/pgzf.c:123: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). ftag = malloc(strlen(outf) + 1 + strlen(rtag) + 1); data/wtdbg2-2.5/pgzf.c:123:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ftag = malloc(strlen(outf) + 1 + strlen(rtag) + 1); data/wtdbg2-2.5/pgzf.c:133: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). ftag[strlen(ftag) - 3] = 0; data/wtdbg2-2.5/pgzf.c:146: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). ftag[strlen(ftag) - 3] = 0; data/wtdbg2-2.5/pgzf.c:152: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). rtag[strlen(rtag) - 3] = 0; data/wtdbg2-2.5/pgzf.c:153: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). ftag = malloc(strlen(outf) + 1 + strlen(rtag) + 1); data/wtdbg2-2.5/pgzf.c:153:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ftag = malloc(strlen(outf) + 1 + strlen(rtag) + 1); data/wtdbg2-2.5/pgzf.c:185: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(argv[c]) >= 4 && strcasecmp(argv[c] + strlen(argv[c]) - 3, ".gz") == 0){ data/wtdbg2-2.5/pgzf.c:185:53: [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(argv[c]) >= 4 && strcasecmp(argv[c] + strlen(argv[c]) - 3, ".gz") == 0){ data/wtdbg2-2.5/pgzf.c:194: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). ftag = malloc(strlen(outf) + 1 + strlen(rtag) + 3 + 1); data/wtdbg2-2.5/pgzf.c:194:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ftag = malloc(strlen(outf) + 1 + strlen(rtag) + 3 + 1); data/wtdbg2-2.5/pgzf.c:203: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). ftag = malloc(strlen(argv[c]) + 4); data/wtdbg2-2.5/pgzf.c:215: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). ftag = malloc(strlen(argv[optind]) + 4); data/wtdbg2-2.5/pgzf.c:223: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). ftag = malloc(strlen(outf) + 1 + strlen(rtag) + 3 + 1); data/wtdbg2-2.5/pgzf.c:223: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). ftag = malloc(strlen(outf) + 1 + strlen(rtag) + 3 + 1); data/wtdbg2-2.5/pgzf.h:226:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = getc(in); data/wtdbg2-2.5/pgzf.h:240:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = getc(in); data/wtdbg2-2.5/wtdbg-graph.h:4947: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). file = malloc(strlen(prefix) + (suffix? strlen(suffix) : 0) + 2); data/wtdbg2-2.5/wtdbg-graph.h:4947: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). file = malloc(strlen(prefix) + (suffix? strlen(suffix) : 0) + 2); data/wtdbg2-2.5/wtdbg.c:1021:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(load_nodes == NULL || strlen(load_nodes) != strlen(prefix) + strlen(".1.nodes") || strncmp(load_nodes, prefix, strlen(prefix)) || strcmp(load_nodes + strlen(prefix), ".1.nodes")){ data/wtdbg2-2.5/wtdbg.c:1021:49: [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(load_nodes == NULL || strlen(load_nodes) != strlen(prefix) + strlen(".1.nodes") || strncmp(load_nodes, prefix, strlen(prefix)) || strcmp(load_nodes + strlen(prefix), ".1.nodes")){ data/wtdbg2-2.5/wtdbg.c:1021:66: [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(load_nodes == NULL || strlen(load_nodes) != strlen(prefix) + strlen(".1.nodes") || strncmp(load_nodes, prefix, strlen(prefix)) || strcmp(load_nodes + strlen(prefix), ".1.nodes")){ data/wtdbg2-2.5/wtdbg.c:1021:116: [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(load_nodes == NULL || strlen(load_nodes) != strlen(prefix) + strlen(".1.nodes") || strncmp(load_nodes, prefix, strlen(prefix)) || strcmp(load_nodes + strlen(prefix), ".1.nodes")){ data/wtdbg2-2.5/wtdbg.c:1021:155: [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(load_nodes == NULL || strlen(load_nodes) != strlen(prefix) + strlen(".1.nodes") || strncmp(load_nodes, prefix, strlen(prefix)) || strcmp(load_nodes + strlen(prefix), ".1.nodes")){ data/wtdbg2-2.5/wtpoa.h:398:42: [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). append_string(ctg->tag, bk->reftag, strlen(bk->reftag)); ANALYSIS SUMMARY: Hits = 346 Lines analyzed = 30714 in approximately 0.99 seconds (30921 lines/second) Physical Source Lines of Code (SLOC) = 27663 Hits@level = [0] 687 [1] 83 [2] 212 [3] 32 [4] 19 [5] 0 Hits@level+ = [0+] 1033 [1+] 346 [2+] 263 [3+] 51 [4+] 19 [5+] 0 Hits/KSLOC@level+ = [0+] 37.3423 [1+] 12.5077 [2+] 9.50728 [3+] 1.84362 [4+] 0.686838 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.