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/scrappie-1.4.2/interface/scrappie.h
Examining data/scrappie-1.4.2/python/pyscrap.h
Examining data/scrappie-1.4.2/src/decode.c
Examining data/scrappie-1.4.2/src/decode.h
Examining data/scrappie-1.4.2/src/event_detection.c
Examining data/scrappie-1.4.2/src/event_detection.h
Examining data/scrappie-1.4.2/src/fast5_interface.c
Examining data/scrappie-1.4.2/src/fast5_interface.h
Examining data/scrappie-1.4.2/src/homopolymer.c
Examining data/scrappie-1.4.2/src/homopolymer.h
Examining data/scrappie-1.4.2/src/kseq.h
Examining data/scrappie-1.4.2/src/layers.c
Examining data/scrappie-1.4.2/src/layers.h
Examining data/scrappie-1.4.2/src/models/nanonet_events.h
Examining data/scrappie-1.4.2/src/models/raw_20170901_r94_4kHz_450bps_0b70da4.h
Examining data/scrappie-1.4.2/src/models/rgrgr-elu_20170914_r94_4kHz_450bps_ca2d1d1.h
Examining data/scrappie-1.4.2/src/models/rgrgr-elu_20180712_r941_4kHz_450bps_ed3b57a.h
Examining data/scrappie-1.4.2/src/models/rgrgr_r10_tanh_20180719_90a6d26.h
Examining data/scrappie-1.4.2/src/models/rnnrf-elu_20171121_r94_4kHz_450bps_c2b6803.h
Examining data/scrappie-1.4.2/src/models/squiggle_r10_20180518_244a3e3.h
Examining data/scrappie-1.4.2/src/models/squiggle_r94_20180502_9010ca3.h
Examining data/scrappie-1.4.2/src/models/squiggle_r94_rna.h
Examining data/scrappie-1.4.2/src/networks.c
Examining data/scrappie-1.4.2/src/networks.h
Examining data/scrappie-1.4.2/src/nnfeatures.c
Examining data/scrappie-1.4.2/src/nnfeatures.h
Examining data/scrappie-1.4.2/src/scrappie.c
Examining data/scrappie-1.4.2/src/scrappie_common.c
Examining data/scrappie-1.4.2/src/scrappie_common.h
Examining data/scrappie-1.4.2/src/scrappie_event_table.c
Examining data/scrappie-1.4.2/src/scrappie_events.c
Examining data/scrappie-1.4.2/src/scrappie_help.c
Examining data/scrappie-1.4.2/src/scrappie_licence.h
Examining data/scrappie-1.4.2/src/scrappie_mappy.c
Examining data/scrappie-1.4.2/src/scrappie_matrix.c
Examining data/scrappie-1.4.2/src/scrappie_matrix.h
Examining data/scrappie-1.4.2/src/scrappie_raw.c
Examining data/scrappie-1.4.2/src/scrappie_seq_helpers.c
Examining data/scrappie-1.4.2/src/scrappie_seq_helpers.h
Examining data/scrappie-1.4.2/src/scrappie_seqmappy.c
Examining data/scrappie-1.4.2/src/scrappie_squiggle.c
Examining data/scrappie-1.4.2/src/scrappie_stdlib.h
Examining data/scrappie-1.4.2/src/scrappie_structures.h
Examining data/scrappie-1.4.2/src/scrappie_subcommands.c
Examining data/scrappie-1.4.2/src/scrappie_subcommands.h
Examining data/scrappie-1.4.2/src/sse_mathfun.h
Examining data/scrappie-1.4.2/src/test/read_crp.c
Examining data/scrappie-1.4.2/src/test/scrappie_test_runner.c
Examining data/scrappie-1.4.2/src/test/scrappie_util.c
Examining data/scrappie-1.4.2/src/test/scrappie_util.h
Examining data/scrappie-1.4.2/src/test/skeleton_rgr.c
Examining data/scrappie-1.4.2/src/test/test_common.h
Examining data/scrappie-1.4.2/src/test/test_map_to_sequence.c
Examining data/scrappie-1.4.2/src/test/test_scrappie_convolution.c
Examining data/scrappie-1.4.2/src/test/test_scrappie_decoding.c
Examining data/scrappie-1.4.2/src/test/test_scrappie_elu.c
Examining data/scrappie-1.4.2/src/test/test_scrappie_event_detection.c
Examining data/scrappie-1.4.2/src/test/test_scrappie_matrix.c
Examining data/scrappie-1.4.2/src/test/test_scrappie_signal.c
Examining data/scrappie-1.4.2/src/test/test_scrappie_squiggle.c
Examining data/scrappie-1.4.2/src/test/test_scrappie_util.c
Examining data/scrappie-1.4.2/src/test/test_skeleton.c
Examining data/scrappie-1.4.2/src/test/test_util.c
Examining data/scrappie-1.4.2/src/test/write_random_crp.c
Examining data/scrappie-1.4.2/src/test_interface.c
Examining data/scrappie-1.4.2/src/util.c
Examining data/scrappie-1.4.2/src/util.h

FINAL RESULTS:

data/scrappie-1.4.2/src/test/scrappie_util.c:145:54:  [3] (random) random:
  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.
    return lower + (upper - lower) * (float)((double)random() / RAND_MAX);
data/scrappie-1.4.2/src/decode.c:410:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char base_lookup[4] = { 'A', 'C', 'G', 'T' };
data/scrappie-1.4.2/src/kseq.h:129:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(str->s + str->l, ks->buf + ks->begin, i - ks->begin); \
data/scrappie-1.4.2/src/layers.c:186:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(C->data.v + i * C->nrq, b->data.v, C->nrq * sizeof(__m128));
data/scrappie-1.4.2/src/layers.c:501: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(xF->data.v, x->data.v, x->nrq * sizeof(__m128));
data/scrappie-1.4.2/src/layers.c:646: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(xF->data.v, x->data.v, x->nrq * sizeof(__m128));
data/scrappie-1.4.2/src/layers.c:807: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(xF->data.v, xAffine->data.v, xAffine->nrq * sizeof(__m128));
data/scrappie-1.4.2/src/scrappie_event_table.c:69:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        args.output = fopen(arg, "w");
data/scrappie-1.4.2/src/scrappie_event_table.c:75: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).
        args.trim_start = atoi(strtok(arg, ":"));
data/scrappie-1.4.2/src/scrappie_event_table.c:78: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).
            args.trim_end = atoi(next_tok);
data/scrappie-1.4.2/src/scrappie_event_table.c:91: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).
        args.varseg_chunk = atoi(strtok(arg, ":"));
data/scrappie-1.4.2/src/scrappie_events.c:146: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).
        args.limit = atoi(arg);
data/scrappie-1.4.2/src/scrappie_events.c:154:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        args.output = fopen(arg, "w");
data/scrappie-1.4.2/src/scrappie_events.c:167: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).
        args.trim_start = atoi(strtok(arg, ":"));
data/scrappie-1.4.2/src/scrappie_events.c:170: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).
            args.trim_end = atoi(next_tok);
data/scrappie-1.4.2/src/scrappie_events.c:214: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).
        args.compression_level = atoi(arg);
data/scrappie-1.4.2/src/scrappie_events.c:218:39:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        args.compression_chunk_size = atoi(arg);
data/scrappie-1.4.2/src/scrappie_events.c:222: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).
        args.varseg_chunk = atoi(strtok(arg, ":"));
data/scrappie-1.4.2/src/scrappie_events.c:241: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).
            int nthread = atoi(arg);
data/scrappie-1.4.2/src/scrappie_events.c:357:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        int fd = open(args.dump, O_CREAT | O_WRONLY | O_EXCL, S_IRUSR | S_IWUSR);
data/scrappie-1.4.2/src/scrappie_events.c:389:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(globpath, args.files[fn], rootlen * sizeof(char));
data/scrappie-1.4.2/src/scrappie_events.c:394:21:  [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(globpath + rootlen, "/*.fast5", 8 * sizeof(char));
data/scrappie-1.4.2/src/scrappie_help.c:7:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char *help_options[2] = { NULL, "--help" };
data/scrappie-1.4.2/src/scrappie_mappy.c:104:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        args.output = fopen(arg, "w");
data/scrappie-1.4.2/src/scrappie_mappy.c:119: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).
        args.varseg_chunk = atoi(strtok(arg, ":"));
data/scrappie-1.4.2/src/scrappie_mappy.c:129: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).
        args.trim_start = atoi(strtok(arg, ":"));
data/scrappie-1.4.2/src/scrappie_mappy.c:132: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).
            args.trim_end = atoi(next_tok);
data/scrappie-1.4.2/src/scrappie_matrix.c:57: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(C->data.f, M->data.f, sizeof(__m128) * C->nrq * C->nc);
data/scrappie-1.4.2/src/scrappie_matrix.c:74:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(res->data.f + col * res->stride, x + col * nr,
data/scrappie-1.4.2/src/scrappie_matrix.c:304: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(C->data.f, M->data.f, sizeof(__m128i) * C->nrq * C->nc);
data/scrappie-1.4.2/src/scrappie_matrix.c:342:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(C->data.v + c * C->nrq, b->data.v, C->nrq * sizeof(__m128));
data/scrappie-1.4.2/src/scrappie_matrix.c:371:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(C->data.v + c * C->nrq, b->data.v, C->nrq * sizeof(__m128));
data/scrappie-1.4.2/src/scrappie_raw.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).
        args.limit = atoi(arg);
data/scrappie-1.4.2/src/scrappie_raw.c:146:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        args.output = fopen(arg, "w");
data/scrappie-1.4.2/src/scrappie_raw.c:159: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).
        args.trim_start = atoi(strtok(arg, ":"));
data/scrappie-1.4.2/src/scrappie_raw.c:162: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).
            args.trim_end = atoi(next_tok);
data/scrappie-1.4.2/src/scrappie_raw.c:186: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).
        args.varseg_chunk = atoi(strtok(arg, ":"));
data/scrappie-1.4.2/src/scrappie_raw.c:222: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).
        args.compression_level = atoi(arg);
data/scrappie-1.4.2/src/scrappie_raw.c:226:39:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        args.compression_chunk_size = atoi(arg);
data/scrappie-1.4.2/src/scrappie_raw.c:238: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).
            int nthread = atoi(arg);
data/scrappie-1.4.2/src/scrappie_raw.c:368:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(globpath, args.files[fn], rootlen * sizeof(char));
data/scrappie-1.4.2/src/scrappie_raw.c:373:21:  [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(globpath + rootlen, "/*.fast5", 8 * sizeof(char));
data/scrappie-1.4.2/src/scrappie_seq_helpers.c:79:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE * fh = fopen(filename, "r");
data/scrappie-1.4.2/src/scrappie_seqmappy.c:90:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        args.output = fopen(arg, "w");
data/scrappie-1.4.2/src/scrappie_seqmappy.c:103: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).
        args.trim_start = atoi(strtok(arg, ":"));
data/scrappie-1.4.2/src/scrappie_seqmappy.c:106: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).
            args.trim_end = atoi(next_tok);
data/scrappie-1.4.2/src/scrappie_seqmappy.c:118: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).
        args.varseg_chunk = atoi(strtok(arg, ":"));
data/scrappie-1.4.2/src/scrappie_squiggle.c:67: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).
        args.limit = atoi(arg);
data/scrappie-1.4.2/src/scrappie_squiggle.c:71:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        args.output = fopen(arg, "w");
data/scrappie-1.4.2/src/scrappie_squiggle.c:142:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE * fh = fopen(args.files[fn], "r");
data/scrappie-1.4.2/src/test/read_crp.c:17: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).
    int nr = atoi(argv[2]);
data/scrappie-1.4.2/src/test/read_crp.c:18: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).
    int nc = atoi(argv[3]);
data/scrappie-1.4.2/src/test/scrappie_util.c:54:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE * fh = fopen(fn, "w");
data/scrappie-1.4.2/src/test/scrappie_util.c:128:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fh = fopen(fn, "r");
data/scrappie-1.4.2/src/test/test_scrappie_convolution.c:57: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(xpad + padL, x.elt, x.len * sizeof(float));
data/scrappie-1.4.2/src/test/test_scrappie_util.c:33:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    infile = fopen(testfile, "r");
data/scrappie-1.4.2/src/test/test_scrappie_util.c:39:21:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    int outfileno = mkstemp(scrappie_matrix_tmpfile_name);
data/scrappie-1.4.2/src/test/write_random_crp.c:14: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).
    int nr = atoi(argv[1]);
data/scrappie-1.4.2/src/test/write_random_crp.c:15: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).
    int nc = atoi(argv[2]);
data/scrappie-1.4.2/src/util.c:113: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(space, x, nx * sizeof(float));
data/scrappie-1.4.2/src/fast5_interface.c:142: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).
    const int rootstr_len = strlen(root);
data/scrappie-1.4.2/src/scrappie_events.c:301: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).
    const size_t basecall_len = strlen(basecall);
data/scrappie-1.4.2/src/scrappie_events.c:334:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const size_t nbase = strlen(res.bases);
data/scrappie-1.4.2/src/scrappie_events.c:387:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const size_t rootlen = strlen(args.files[fn]);
data/scrappie-1.4.2/src/scrappie_raw.c:311: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).
    const size_t basecall_len = strlen(basecall);
data/scrappie-1.4.2/src/scrappie_raw.c:366:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const size_t rootlen = strlen(args.files[fn]);
data/scrappie-1.4.2/src/scrappie_seq_helpers.c:13:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
KSEQ_INIT(int, read);
data/scrappie-1.4.2/src/scrappie_seq_helpers.c:92:23:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            seq.seq = strncpy(base_seq, kseqer->seq.s, kseqer->seq.l);
data/scrappie-1.4.2/src/scrappie_seq_helpers.c:93:24:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            seq.name = strncpy(name, kseqer->name.s, kseqer->name.l);
data/scrappie-1.4.2/src/scrappie_squiggle.c:14:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
KSEQ_INIT(int, read)
data/scrappie-1.4.2/src/scrappie_stdlib.h:41: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).
#    define strlen(A) (NULL != A) ? strlen(A) : 0
data/scrappie-1.4.2/src/scrappie_stdlib.h:41:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#    define strlen(A) (NULL != A) ? strlen(A) : 0
data/scrappie-1.4.2/src/test/test_scrappie_util.c:38:11:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    (void)umask(022);

ANALYSIS SUMMARY:

Hits = 73
Lines analyzed = 117797 in approximately 56.12 seconds (2099 lines/second)
Physical Source Lines of Code (SLOC) = 114690
Hits@level = [0]  38 [1]  13 [2]  59 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+] 111 [1+]  73 [2+]  60 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 0.967826 [1+] 0.636498 [2+] 0.523149 [3+] 0.00871916 [4+]   0 [5+]   0
Symlinks skipped = 7 (--allowlink overrides but see doc for security issue)
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.