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/sibsim4-0.20/align.c
Examining data/sibsim4-0.20/sim4b1.h
Examining data/sibsim4-0.20/align.h
Examining data/sibsim4-0.20/sim4.h
Examining data/sibsim4-0.20/sim4b1.c
Examining data/sibsim4-0.20/misc.c
Examining data/sibsim4-0.20/misc.h
Examining data/sibsim4-0.20/sim4.init.c

FINAL RESULTS:

data/sibsim4-0.20/misc.c:31:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf(stderr, fmt, ap);
data/sibsim4-0.20/misc.h:16:30:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
     __attribute__ ((format (printf, 1, 2) , __noreturn__));
data/sibsim4-0.20/sim4.init.c:283:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(stderr, Usage, argv[0],
data/sibsim4-0.20/sim4.init.c:151: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.
    int c = getopt(argc, argv, "A:C:c:E:f:g:H:I:K:L:M:o:q:R:r:S:s:W:X:");
data/sibsim4-0.20/misc.c:22: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.
  extern char dna_seq_head[256];
data/sibsim4-0.20/misc.c:23: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.
  extern char rna_seq_head[256];
data/sibsim4-0.20/sim4.h:64:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char in[BUF_SIZE];
data/sibsim4-0.20/sim4.init.c:112: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 dna_seq_head[256];
data/sibsim4-0.20/sim4.init.c:113: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 rna_seq_head[256];
data/sibsim4-0.20/sim4.init.c:156: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).
      options.ali_flag = atoi(optarg);
data/sibsim4-0.20/sim4.init.c:161: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).
      int val = atoi(optarg);
data/sibsim4-0.20/sim4.init.c:168: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).
      int val = atoi(optarg);
data/sibsim4-0.20/sim4.init.c:175: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).
      options.cutoff = atoi(optarg);
data/sibsim4-0.20/sim4.init.c:180:42:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      options.filterPct = (unsigned int) atoi(optarg);
data/sibsim4-0.20/sim4.init.c:185: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).
      options.gapPct = (unsigned int) atoi(optarg);
data/sibsim4-0.20/sim4.init.c:190:44:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      options.huntChimera = (unsigned int) atoi(optarg);
data/sibsim4-0.20/sim4.init.c:195: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).
      int val = atoi(optarg);
data/sibsim4-0.20/sim4.init.c:202: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).
      int val = atoi(optarg);
data/sibsim4-0.20/sim4.init.c:234: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).
      int val = atoi(optarg);
data/sibsim4-0.20/sim4.init.c:241: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).
      int val = atoi(optarg);
data/sibsim4-0.20/sim4.init.c:248: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).
      options.mismatchScore = atoi(optarg);
data/sibsim4-0.20/sim4.init.c:251: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).
      options.reverse = (unsigned int) atoi(optarg);
data/sibsim4-0.20/sim4.init.c:256: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).
      options.matchScore = atoi(optarg);
data/sibsim4-0.20/sim4.init.c:259:44:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      options.spliceInDel = (unsigned int) atoi(optarg);
data/sibsim4-0.20/sim4.init.c:262:46:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      options.splitScorePct = (unsigned int) atoi(optarg);
data/sibsim4-0.20/sim4.init.c:267: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).
      options.W = (unsigned int) atoi(optarg);
data/sibsim4-0.20/sim4.init.c:272:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      options.X = (unsigned int) atoi(optarg);
data/sibsim4-0.20/sim4.init.c:444:23:  [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 unsigned char dna_complement[256] =
data/sibsim4-0.20/sim4.init.c:521:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char *pSig, buf[51];
data/sibsim4-0.20/sim4.init.c:551:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char *pSig, buf[51];
data/sibsim4-0.20/sim4.init.c:705:14:  [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).
    sp->fd = open(fName, O_RDONLY);
data/sibsim4-0.20/sim4.init.c:734: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(sp->header, buf, (sp->rb.lc + 1) * sizeof(char));
data/sibsim4-0.20/sim4b1.c:1289: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(c, mp, sizeof(exon_t));
data/sibsim4-0.20/sim4b1.c:2278: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(eCol->e.elt + pos, aCol->e.elt, aCol->nb * sizeof(void *));
data/sibsim4-0.20/sim4b1.c:2392: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(splice, seq1 + splS->to1, 2UL);
data/sibsim4-0.20/sim4b1.c:2393: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(splice + 2, seq1 + splS->nFrom1 - 3, 2UL);
data/sibsim4-0.20/sim4b1.c:2440: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(s + options.scoreSplice_window, jct, 4UL);
data/sibsim4-0.20/sim4b1.c:2447:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(s, seq2 + to2 - options.scoreSplice_window + j,
data/sibsim4-0.20/sim4b1.c:2449:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(s + options.scoreSplice_window + 4, seq2 + to2 + j,
data/sibsim4-0.20/sim4.init.c:210:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      size_t len = strlen(optarg);
data/sibsim4-0.20/sim4.init.c:310:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(dna_seq_head, seq1.header, 256UL);
data/sibsim4-0.20/sim4.init.c:327:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(rna_seq_head, seq2.header, 256UL);
data/sibsim4-0.20/sim4.init.c:539:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buf, (char *) s1->seq + e->to1 - scanLen, (size_t) scanLen);
data/sibsim4-0.20/sim4.init.c:568:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buf, (char *) s1->seq + e->from1 - 1, 50UL);
data/sibsim4-0.20/sim4.init.c:671:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((rc = read(fd, b->in + b->ic,

ANALYSIS SUMMARY:

Hits = 45
Lines analyzed = 4448 in approximately 0.14 seconds (32865 lines/second)
Physical Source Lines of Code (SLOC) = 3792
Hits@level = [0]  61 [1]   6 [2]  35 [3]   1 [4]   3 [5]   0
Hits@level+ = [0+] 106 [1+]  45 [2+]  39 [3+]   4 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 27.9536 [1+] 11.8671 [2+] 10.2848 [3+] 1.05485 [4+] 0.791139 [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.