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/lagan-2.0/src/ancseq.cpp
Examining data/lagan-2.0/src/ancseqrest.cpp
Examining data/lagan-2.0/src/cutmfa.cpp
Examining data/lagan-2.0/src/diagmatrix.c
Examining data/lagan-2.0/src/diagmatrix.h
Examining data/lagan-2.0/src/faindex.cpp
Examining data/lagan-2.0/src/fchaos.h
Examining data/lagan-2.0/src/filebuffer.h
Examining data/lagan-2.0/src/global.c
Examining data/lagan-2.0/src/global.h
Examining data/lagan-2.0/src/glocal/glocal.cpp
Examining data/lagan-2.0/src/glocal/glocal.h
Examining data/lagan-2.0/src/glocal/io.cpp
Examining data/lagan-2.0/src/glocal/io.h
Examining data/lagan-2.0/src/glocal/leftinfluence.cpp
Examining data/lagan-2.0/src/glocal/leftinfluence.h
Examining data/lagan-2.0/src/glocal/rightinfluence.h
Examining data/lagan-2.0/src/glocal/score.h
Examining data/lagan-2.0/src/glocal/structs.h
Examining data/lagan-2.0/src/glocal/score.cpp
Examining data/lagan-2.0/src/glocal/rightinfluence.cpp
Examining data/lagan-2.0/src/lagan2mfa.cpp
Examining data/lagan-2.0/src/makecons.cpp
Examining data/lagan-2.0/src/mempage.c
Examining data/lagan-2.0/src/mempage.h
Examining data/lagan-2.0/src/mlagan.c
Examining data/lagan-2.0/src/multial.c
Examining data/lagan-2.0/src/multial.h
Examining data/lagan-2.0/src/order.c
Examining data/lagan-2.0/src/order.h
Examining data/lagan-2.0/src/prolagan.c
Examining data/lagan-2.0/src/skiplist.c
Examining data/lagan-2.0/src/skiplist.h
Examining data/lagan-2.0/src/sortlist.c
Examining data/lagan-2.0/src/thrtrie.c
Examining data/lagan-2.0/src/translate.c
Examining data/lagan-2.0/src/translate.h
Examining data/lagan-2.0/src/util.cpp
Examining data/lagan-2.0/src/utils/bin2bl.c
Examining data/lagan-2.0/src/utils/bin2mf.c
Examining data/lagan-2.0/src/utils/cextract.c
Examining data/lagan-2.0/src/utils/contigorder.c
Examining data/lagan-2.0/src/utils/cstat.c
Examining data/lagan-2.0/src/utils/dotplot.cpp
Examining data/lagan-2.0/src/utils/fa2xfa.c
Examining data/lagan-2.0/src/utils/getbounds.c
Examining data/lagan-2.0/src/utils/getcontigpos.c
Examining data/lagan-2.0/src/utils/getlength.c
Examining data/lagan-2.0/src/utils/getoverlap.c
Examining data/lagan-2.0/src/utils/MultiSequence.h
Examining data/lagan-2.0/src/utils/Output.h
Examining data/lagan-2.0/src/utils/overlay.c
Examining data/lagan-2.0/src/utils/rc.c
Examining data/lagan-2.0/src/utils/SafeVector.h
Examining data/lagan-2.0/src/utils/scorealign.c
Examining data/lagan-2.0/src/utils/scorecontigs.c
Examining data/lagan-2.0/src/utils/seqmerge.c
Examining data/lagan-2.0/src/utils/Sequence.h
Examining data/lagan-2.0/src/utils/Glue.cpp
Examining data/lagan-2.0/src/anchors.c
Examining data/lagan-2.0/src/filebuffer.c
Examining data/lagan-2.0/src/fchaos.c
Examining data/lagan-2.0/src/thrtrie.h

FINAL RESULTS:

data/lagan-2.0/src/ancseq.cpp:104:3:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		sscanf(line,"%s %s %d %d %c %s %s %d %d %c %s %s %d %d %c",
data/lagan-2.0/src/ancseq.cpp:455:4:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
			sscanf(line,"%c %s %s %d %d %c",&operation,orgName,seqName,&com.start,&com.end,&com.strand);
data/lagan-2.0/src/ancseq.cpp:458:4:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
			sscanf(line,"%c %s %s %c",&operation,alignId1,orgName,&com.strand);
data/lagan-2.0/src/ancseq.cpp:461:4:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
			sscanf(line,"%c %s %s %s %c %d %d",&operation,alignId1,alignId2,orgName,&com.strand,&com.over1,&com.over2);
data/lagan-2.0/src/ancseq.cpp:464:4:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
			sscanf(line,"%c %s %s %s %c",&operation,alignId1,alignId2,orgName,&com.strand);
data/lagan-2.0/src/ancseqrest.cpp:118:3:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		sscanf(line,"%s %s %d %d %c %s %s %d %d %c %s %s %d %d %c",
data/lagan-2.0/src/ancseqrest.cpp:244:3:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		sscanf(line,"%s %ld %d",id,&record.offset,&record.length);
data/lagan-2.0/src/cutmfa.cpp:130:3:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		sscanf(buf,"%s %d %d %s %d %d %c ",name,&start,&end,name2,&start2,&end2,&strand);
data/lagan-2.0/src/cutmfa.cpp:132:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(name,name2);
data/lagan-2.0/src/faindex.cpp:23:3:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		sscanf(line,"%s %ld %d",id,&record.offset,&record.length);
data/lagan-2.0/src/fchaos.c:350:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(myseq->name, temp+1);
data/lagan-2.0/src/fchaos.c:608:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (line, "%s/%s", getenv ("LAGAN_DIR"), filename);
data/lagan-2.0/src/filebuffer.c:117:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(myseq->name, tempname+1);
data/lagan-2.0/src/glocal/io.cpp:61:2:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	sscanf(temp, "%s", tt->seq1Name);
data/lagan-2.0/src/glocal/io.cpp:67:2:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	sscanf(help+h, "%s", tt->seq2Name);
data/lagan-2.0/src/glocal/io.cpp:140: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(frag.seq1Name, temp->seq1Name);
data/lagan-2.0/src/glocal/io.cpp:141: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(frag.seq2Name, temp->seq2Name);
data/lagan-2.0/src/lagan2mfa.cpp:72:3:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		sscanf(buf,"%s %s %d %d %c %s %s %d %d %c %s %s %d %d %c",
data/lagan-2.0/src/makecons.cpp:70:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
				strcpy(annot,buf);
data/lagan-2.0/src/makecons.cpp:213:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(annot,nextAnnot);
data/lagan-2.0/src/mlagan.c:86:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(myseq->name, temp+1);
data/lagan-2.0/src/mlagan.c:126:3:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
  sscanf(str, "%s", first_word);
data/lagan-2.0/src/mlagan.c:167:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(buff, "%s.anchors", fname);
data/lagan-2.0/src/mlagan.c:231:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(buff, "%s/rechaos.pl %s %s -out %s.anchors %s %s %s %s %s\n",
data/lagan-2.0/src/mlagan.c:242:13:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  retstat = system(buff) >> 8;
data/lagan-2.0/src/mlagan.c:606:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    sscanf (simalign[i]->seqs[0]->name,"%s",names[i]); 
data/lagan-2.0/src/mlagan.c:624:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(temp, "(%s %s)", names[mli], names[mlj]);
data/lagan-2.0/src/multial.c:458:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (line, "%s/%s", getenv ("LAGAN_DIR"), filename);
data/lagan-2.0/src/order.c:67:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(myseq->name, temp+1);
data/lagan-2.0/src/order.c:131:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (line, "%s/%s", getenv ("LAGAN_DIR"), filename);
data/lagan-2.0/src/prolagan.c:86:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(myseq->name, temp+1);
data/lagan-2.0/src/prolagan.c:126:3:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
  sscanf(str, "%s", first_word);
data/lagan-2.0/src/prolagan.c:252:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(buff, "%s.anchors", fname);
data/lagan-2.0/src/prolagan.c:316:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(buff, "%s/rechaos.pl %s %s -out %s.anchors %s %s %s %s %s\n",
data/lagan-2.0/src/prolagan.c:327:13:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  retstat = system(buff) >> 8;
data/lagan-2.0/src/translate.c:65:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(resseq->name, "%s_f%c%d", theseq->name, (revcomp)?'-':'+', frame);
data/lagan-2.0/src/utils/Glue.cpp:39:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (line, "%s/%s", lagan_dir, filename);
data/lagan-2.0/src/utils/Sequence.h:39:19:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    int numread = sscanf (header.c_str(), ">%d:%d-%d %c %s", &id, &startCoord, &endCoord, &direction, buffer);
data/lagan-2.0/src/utils/bin2bl.c:45:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(MyName, slash + 1);
data/lagan-2.0/src/utils/bin2bl.c:47:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(MyName, argv[0]);
data/lagan-2.0/src/utils/bin2bl.c:117:7:  [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(line1 + html_length, font_start);
data/lagan-2.0/src/utils/bin2bl.c:118:7:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
      strcat(line1, status_start);
data/lagan-2.0/src/utils/bin2bl.c:121:7:  [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(line1 + html_length + 1, dash);
data/lagan-2.0/src/utils/bin2bl.c:123:7:  [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(line1 + html_length + strlen(dash) + 2, status_end);
data/lagan-2.0/src/utils/bin2bl.c:126:7:  [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(line1 + html_length + 1, font_end);
data/lagan-2.0/src/utils/bin2bl.c:171:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(line, tick);
data/lagan-2.0/src/utils/cextract.c:42:29:  [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).
    if (strlen (name) == 0) strcpy (name, buffer);
data/lagan-2.0/src/utils/cstat.c:73:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(myal->names[seqnum], temp+1);
data/lagan-2.0/src/utils/fa2xfa.c:56:29:  [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).
    if (strlen (name) == 0) strcpy (name, buffer);
data/lagan-2.0/src/utils/getcontigpos.c:42:29:  [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).
    if (strlen (name) == 0) strcpy (name, buffer);
data/lagan-2.0/src/utils/scorealign.c:246:13:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
  numread = sscanf (line, ">%d:%d-%d %c %s", si, ss, se, sd, *sc);
data/lagan-2.0/src/utils/scorealign.c:410:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (line, "%s/%s", lagan_dir, filename);
data/lagan-2.0/src/utils/scorecontigs.c:87:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(res->names[res->numseqs], temp+1);
data/lagan-2.0/src/utils/scorecontigs.c:384:9:  [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.
    if (fscanf (filelist, "%d %d %d %s\n", &(num[numseqs]), &(offs1[numseqs]), &(offs2[numseqs]), &(contignames[numseqs])) == 4){
data/lagan-2.0/src/fchaos.c:608:27:  [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.
  sprintf (line, "%s/%s", getenv ("LAGAN_DIR"), filename);
data/lagan-2.0/src/makecons.cpp:196:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand((int)time(NULL));
data/lagan-2.0/src/mlagan.c:952:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  lagan_dir = getenv ("LAGAN_DIR");
data/lagan-2.0/src/multial.c:458:29:  [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.
    sprintf (line, "%s/%s", getenv ("LAGAN_DIR"), filename);
data/lagan-2.0/src/order.c:131:27:  [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.
  sprintf (line, "%s/%s", getenv ("LAGAN_DIR"), filename);
data/lagan-2.0/src/prolagan.c:970:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  lagan_dir = getenv ("LAGAN_DIR");
data/lagan-2.0/src/skiplist.c:16:20:  [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.
  unsigned int r = lrand48();
data/lagan-2.0/src/utils/Glue.cpp:33:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  lagan_dir = getenv ("LAGAN_DIR");
data/lagan-2.0/src/utils/scorealign.c:404:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  lagan_dir = getenv ("LAGAN_DIR");
data/lagan-2.0/src/anchors.c:34: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 seq1name[255];
data/lagan-2.0/src/anchors.c:35: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 seq2name[255];
data/lagan-2.0/src/anchors.c:76:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  else if (!(inf = fopen(argv[1],"r"))) {
data/lagan-2.0/src/anchors.c:229:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char temp[1024];
data/lagan-2.0/src/ancseq.cpp:51: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[fastaRowLength+1];
data/lagan-2.0/src/ancseq.cpp:87: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 line[2000];
data/lagan-2.0/src/ancseq.cpp:88: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 id[1000];
data/lagan-2.0/src/ancseq.cpp:89: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 name1[1000];
data/lagan-2.0/src/ancseq.cpp:90: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 name2[1000];
data/lagan-2.0/src/ancseq.cpp:91: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 org0[1000];
data/lagan-2.0/src/ancseq.cpp:92: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 org1[1000];
data/lagan-2.0/src/ancseq.cpp:93: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 org2[1000];
data/lagan-2.0/src/ancseq.cpp:220: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).
	index.proto=atoi(protoNumber.c_str());
data/lagan-2.0/src/ancseq.cpp:364: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(cons,buf,ind.length);
data/lagan-2.0/src/ancseq.cpp:433: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 line[1000];
data/lagan-2.0/src/ancseq.cpp:434: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 orgName[100];
data/lagan-2.0/src/ancseq.cpp:435: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 seqName[100];
data/lagan-2.0/src/ancseq.cpp:436: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 alignId1[100];
data/lagan-2.0/src/ancseq.cpp:437: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 alignId2[100];
data/lagan-2.0/src/ancseq.cpp:534: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).
	proto[org[1]]=atoi(getArgAt("-g1",2,argc,argv).c_str());
data/lagan-2.0/src/ancseq.cpp:535: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).
	proto[org[2]]=atoi(getArgAt("-g2",2,argc,argv).c_str());
data/lagan-2.0/src/ancseqrest.cpp:43: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[20];
data/lagan-2.0/src/ancseqrest.cpp:44: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(buf,"%d",i);
data/lagan-2.0/src/ancseqrest.cpp:49: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 *f=fopen(path.c_str(),mode);
data/lagan-2.0/src/ancseqrest.cpp:104: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 line[2000];
data/lagan-2.0/src/ancseqrest.cpp:105:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char genome0[1000];
data/lagan-2.0/src/ancseqrest.cpp:106: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 genome1[1000];
data/lagan-2.0/src/ancseqrest.cpp:107: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 genome2[1000];
data/lagan-2.0/src/ancseqrest.cpp:108: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 name0[1000];
data/lagan-2.0/src/ancseqrest.cpp:109: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 name1[1000];
data/lagan-2.0/src/ancseqrest.cpp:110: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 name2[1000];
data/lagan-2.0/src/ancseqrest.cpp:238: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 line[2000];
data/lagan-2.0/src/ancseqrest.cpp:239: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 id[200];
data/lagan-2.0/src/ancseqrest.cpp:297:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	genomeNumber=atoi(getArg("-n",argc,argv).c_str());
data/lagan-2.0/src/ancseqrest.cpp:298: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).
	proto1=atoi(getArg("-p1",argc,argv).c_str());
data/lagan-2.0/src/ancseqrest.cpp:299: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).
	proto2=atoi(getArg("-p2",argc,argv).c_str());
data/lagan-2.0/src/cutmfa.cpp:97: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[bufSize];
data/lagan-2.0/src/cutmfa.cpp:98: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 name[bufSize];
data/lagan-2.0/src/cutmfa.cpp:101: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 name2[bufSize];
data/lagan-2.0/src/cutmfa.cpp:120: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).
	useOrg=atoi(getArg("-u",argc,argv).c_str());
data/lagan-2.0/src/cutmfa.cpp:121: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).
	gapped=atoi(getArg("-g",argc,argv).c_str());
data/lagan-2.0/src/cutmfa.cpp:122: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).
	protoStart=atoi(getArg("-s",argc,argv).c_str());
data/lagan-2.0/src/cutmfa.cpp:123:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	protoEnd=atoi(getArg("-e",argc,argv).c_str());
data/lagan-2.0/src/cutmfa.cpp:124: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).
	masked=atoi(getArg("-m",argc,argv).c_str());
data/lagan-2.0/src/faindex.cpp:17: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 line[1000];
data/lagan-2.0/src/faindex.cpp:18: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 id[100];
data/lagan-2.0/src/faindex.cpp:48: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 protoId[20];
data/lagan-2.0/src/faindex.cpp:49: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(protoId,"%d",protoIndex);
data/lagan-2.0/src/fchaos.c:339: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 temp[256];
data/lagan-2.0/src/fchaos.c:494: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 (curr->myhits[offset].inds2, bestelem->myhits[bestoffset].inds2,
data/lagan-2.0/src/fchaos.c:496: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 (curr->myhits[offset].inds1, bestelem->myhits[bestoffset].inds1,
data/lagan-2.0/src/fchaos.c:605: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 line[1024], *symbs;
data/lagan-2.0/src/fchaos.c:609: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 (line, "r"); assert (file);
data/lagan-2.0/src/fchaos.c:662: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).
      reScoreCutoff  = atoi(argv[++i]);
data/lagan-2.0/src/fchaos.c:671: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).
      wordlen = atoi(argv[++i]);
data/lagan-2.0/src/fchaos.c:674: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).
      ndegen = atoi(argv[++i]);
data/lagan-2.0/src/fchaos.c:677: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).
      cutoff = atoi(argv[++i]);
data/lagan-2.0/src/fchaos.c:680: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).
      lookback = atoi(argv[++i]);
data/lagan-2.0/src/fchaos.c:683: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).
      mgaplen = atoi(argv[++i]);
data/lagan-2.0/src/fchaos.c:686: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).
      gappeno = atoi(argv[++i]);
data/lagan-2.0/src/fchaos.c:689: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).
      gappenc = atoi(argv[++i]);
data/lagan-2.0/src/fchaos.c:692: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).
      s1start = atoi(argv[++i]);
data/lagan-2.0/src/fchaos.c:693:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      s1end = atoi(argv[++i]);
data/lagan-2.0/src/fchaos.c:696: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).
      s2start = atoi(argv[++i]);
data/lagan-2.0/src/fchaos.c:697:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      s2end = atoi(argv[++i]);
data/lagan-2.0/src/fchaos.c:700:24:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      if (!(pairfile = fopen(argv[++i],"r"))) {
data/lagan-2.0/src/fchaos.c:740: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 savs[2];
data/lagan-2.0/src/filebuffer.c:16: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 *data = fopen (path, "r");
data/lagan-2.0/src/filebuffer.c:96: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 *tempname, temp[256], currchar, *curr, *resend;
data/lagan-2.0/src/filebuffer.h:20: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 buffer[BUFFER_SIZE];
data/lagan-2.0/src/glocal/io.cpp:56: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 temp[1024];
data/lagan-2.0/src/glocal/io.cpp:168: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 line[1024];
data/lagan-2.0/src/glocal/io.cpp:172:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(fileName, "r");
data/lagan-2.0/src/glocal/score.cpp:40:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char line[255];
data/lagan-2.0/src/glocal/score.cpp:42: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).
	SFP.open(scoreFileName);
data/lagan-2.0/src/glocal/structs.h:62: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 seq1Name[NAMESIZE];
data/lagan-2.0/src/glocal/structs.h:64: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 seq2Name[NAMESIZE];
data/lagan-2.0/src/glocal/structs.h:81: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 seq1Name[NAMESIZE];
data/lagan-2.0/src/glocal/structs.h:82: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 seq2Name[NAMESIZE];
data/lagan-2.0/src/lagan2mfa.cpp:35: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[bufSize];
data/lagan-2.0/src/lagan2mfa.cpp:37: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 org0[1000];
data/lagan-2.0/src/lagan2mfa.cpp:38: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 name0[1000];
data/lagan-2.0/src/lagan2mfa.cpp:43: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 org1[1000];
data/lagan-2.0/src/lagan2mfa.cpp: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 name1[1000];
data/lagan-2.0/src/lagan2mfa.cpp:49: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 org2[1000];
data/lagan-2.0/src/lagan2mfa.cpp:50: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 name2[1000];
data/lagan-2.0/src/lagan2mfa.cpp:64:8:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	proto=atoi(getArg("-p",argc,argv).c_str());
data/lagan-2.0/src/makecons.cpp:51: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 *f=fopen(path,mode);
data/lagan-2.0/src/makecons.cpp:61: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[bufSize];
data/lagan-2.0/src/makecons.cpp:76: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(&seq[seqLen],buf,bufLen);
data/lagan-2.0/src/makecons.cpp:158: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 maxLetter[5];
data/lagan-2.0/src/makecons.cpp:172: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 letter[proto];
data/lagan-2.0/src/makecons.cpp:193: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 annot[2000];
data/lagan-2.0/src/makecons.cpp:194: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 nextAnnot[2000];
data/lagan-2.0/src/makecons.cpp:200:8:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	proto=atoi(getArg("-p",argc,argv));
data/lagan-2.0/src/mempage.c:52: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(tbr, prevptr, prevsize);
data/lagan-2.0/src/mlagan.c:72: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 temp[256];
data/lagan-2.0/src/mlagan.c:162: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 buff[256];
data/lagan-2.0/src/mlagan.c:168:11:  [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).
  ancfile=fopen(buff, "r");
data/lagan-2.0/src/mlagan.c:206: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 buff[256];
data/lagan-2.0/src/mlagan.c:207: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 fname[80];
data/lagan-2.0/src/mlagan.c:526: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.
int treeToRPN(char *treestr, align *stack[MAX_SEQ*2], int *depth) {
data/lagan-2.0/src/mlagan.c:529: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 buffer[256];
data/lagan-2.0/src/mlagan.c:594: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 *names[MAX_SEQ];
data/lagan-2.0/src/mlagan.c:802: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).
      outfile = fopen(argv[i], "w");
data/lagan-2.0/src/mlagan.c:826: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).
      gapperseq = atoi(argv[i]);
data/lagan-2.0/src/mlagan.c:835: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).
      overlap = atoi(argv[i]);
data/lagan-2.0/src/mlagan.c:844: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).
      glwidth = atoi(argv[i]);
data/lagan-2.0/src/mlagan.c:942: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 command[256];
data/lagan-2.0/src/multial.c:160:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(res->name, "Consensus_%d", ++cons_cnt);
data/lagan-2.0/src/multial.c:186: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 *mat[MAX_SEQ];
data/lagan-2.0/src/multial.c:397: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(temp2-totsize, t->algn, t->algnlen*sizeof(long long int));
data/lagan-2.0/src/multial.c:448: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.
void readSubstMatrix (char *filename, int size, int substmatrix[256][256]){
data/lagan-2.0/src/multial.c:450: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 line[1024];
data/lagan-2.0/src/multial.c:459:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file = fopen (line, "r"); assert (file);
data/lagan-2.0/src/multial.c:462:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file = fopen (nucmatrixfile, "r"); assert (file);
data/lagan-2.0/src/multial.c:496:35:  [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.
inline int chmatchscore (unsigned char a, unsigned char b, int substmatrix[256][256]) {
data/lagan-2.0/src/multial.c:496:52:  [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.
inline int chmatchscore (unsigned char a, unsigned char b, int substmatrix[256][256]) {
data/lagan-2.0/src/order.c:56: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 temp[256];
data/lagan-2.0/src/order.c:128: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 line[1024], *symbs;
data/lagan-2.0/src/order.c:132: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 (line, "r"); assert (file);
data/lagan-2.0/src/order.c:159: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).
      gapstart = atoi(argv[++i]);
data/lagan-2.0/src/order.c:162: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).
     gapcont = atoi(argv[++i]);
data/lagan-2.0/src/order.c:180: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).
      glwidth = atoi(argv[++i]);
data/lagan-2.0/src/order.c:183: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).
      s1start = atoi(argv[++i]);
data/lagan-2.0/src/order.c:184:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      s1end = atoi(argv[++i]);
data/lagan-2.0/src/order.c:187: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).
      s2start = atoi(argv[++i]);
data/lagan-2.0/src/order.c:188:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      s2end = atoi(argv[++i]);
data/lagan-2.0/src/order.c:191: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).
      if (!(ancfile = fopen(argv[++i],"r"))) {
data/lagan-2.0/src/order.c:197: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).
      if (!(outfile = fopen(argv[++i],"w"))) {
data/lagan-2.0/src/order.c:226: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 buff[256];
data/lagan-2.0/src/order.c:597: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(temp2-totsize, t->algn, t->algnlen*sizeof(*temp));
data/lagan-2.0/src/order.c:709: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 lets[256];
data/lagan-2.0/src/prolagan.c:72: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 temp[256];
data/lagan-2.0/src/prolagan.c:247: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 buff[256];
data/lagan-2.0/src/prolagan.c:253:11:  [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).
  ancfile=fopen(buff, "r");
data/lagan-2.0/src/prolagan.c:291: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 buff[256];
data/lagan-2.0/src/prolagan.c:292: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 fname[80];
data/lagan-2.0/src/prolagan.c:628: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.
int treeToRPN(char *treestr, align *stack[MAX_SEQ*2], int *depth) {
data/lagan-2.0/src/prolagan.c:631: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 buffer[256];
data/lagan-2.0/src/prolagan.c:805: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).
      outfile = fopen(argv[i], "w");
data/lagan-2.0/src/prolagan.c:829: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).
      gapperseq = atoi(argv[i]);
data/lagan-2.0/src/prolagan.c:838: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).
      overlap = atoi(argv[i]);
data/lagan-2.0/src/prolagan.c:847: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).
      glwidth = atoi(argv[i]);
data/lagan-2.0/src/prolagan.c:960: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 command[256];
data/lagan-2.0/src/thrtrie.c:263:37:  [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.
    if (jobqueue[i].numdeg > 0 && ((char *) jobqueue[i].degloc[0] < word - (height -jobqueue[i].mynode->height))) {
data/lagan-2.0/src/thrtrie.h:49: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 *degloc[MAX_DEGEN];
data/lagan-2.0/src/util.cpp:11: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[20];
data/lagan-2.0/src/util.cpp:12: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(buf,"%d",i);
data/lagan-2.0/src/util.cpp:17: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 *f=fopen(path.c_str(),mode);
data/lagan-2.0/src/utils/Glue.cpp:30: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 lets[256], line[1024];  
data/lagan-2.0/src/utils/Glue.cpp:42: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 (line, "r"); assert (file);
data/lagan-2.0/src/utils/Glue.cpp:363: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).
    if (!(outfile = fopen (argv[2], "w"))) {
data/lagan-2.0/src/utils/Sequence.h:38: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 buffer[1024];
data/lagan-2.0/src/utils/bin2bl.c:9: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 MyName[1024];
data/lagan-2.0/src/utils/bin2bl.c:28: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 line1[1024];
data/lagan-2.0/src/utils/bin2bl.c:29: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 line2[80];
data/lagan-2.0/src/utils/bin2bl.c:30: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 match[80];
data/lagan-2.0/src/utils/bin2bl.c:31: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 ticks1[80] = "";
data/lagan-2.0/src/utils/bin2bl.c:32: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 ticks2[80] = "";
data/lagan-2.0/src/utils/bin2bl.c:33: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 snp_fname[1024] = "";
data/lagan-2.0/src/utils/bin2bl.c:34: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 font_start[80] = "<b><font color=red ";
data/lagan-2.0/src/utils/bin2bl.c:39:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char snp_bases[2];
data/lagan-2.0/src/utils/bin2bl.c:59:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      ((infile = fopen(argv[param1], "r")) == NULL)) ||
data/lagan-2.0/src/utils/bin2bl.c:75:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
    strcat(snp_fname, "SNP.txt");
data/lagan-2.0/src/utils/bin2bl.c:76: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).
    snp_file = fopen(snp_fname, "r");
data/lagan-2.0/src/utils/bin2bl.c:162: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 tick[20];
data/lagan-2.0/src/utils/bin2bl.c:164:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(tick, "%d", count);
data/lagan-2.0/src/utils/bin2mf.c:10: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 MyName[1024];
data/lagan-2.0/src/utils/bin2mf.c:25:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      ((infile = fopen(argv[1], "r")) == NULL))
data/lagan-2.0/src/utils/cextract.c:8: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 name[1024], name2[1024], **seqs, **seqs2;
data/lagan-2.0/src/utils/cextract.c:12:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[1024], ch;
data/lagan-2.0/src/utils/cextract.c:15: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 (filename, "r"); assert (file);
data/lagan-2.0/src/utils/cextract.c:29: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 buffer[1024], ch;
data/lagan-2.0/src/utils/cextract.c:38: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 (filename, "r"); assert (file);
data/lagan-2.0/src/utils/cextract.c:96:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  begin = atoi (argv[2]);
data/lagan-2.0/src/utils/cextract.c:97:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  finish = atoi (strdup(argv[3]));
data/lagan-2.0/src/utils/cextract.c:98:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  seqIdx = atoi (argv[4]);
data/lagan-2.0/src/utils/cextract.c:99:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  seqExt = atoi (argv[5]);
data/lagan-2.0/src/utils/contigorder.c:14: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).
  if (!(file = fopen (filename, "r"))){
data/lagan-2.0/src/utils/contigorder.c:51: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).
  if (!(file = fopen (filename, "r"))){
data/lagan-2.0/src/utils/cstat.c:39:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char temp[256];
data/lagan-2.0/src/utils/cstat.c:62: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 temp[256];
data/lagan-2.0/src/utils/cstat.c:240: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).
  if (!(alignfile = fopen(argv[1],"r"))) {
data/lagan-2.0/src/utils/cstat.c:246:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    s1shift = atoi (argv[5]);
data/lagan-2.0/src/utils/cstat.c:247:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    s2shift = atoi (argv[6]);
data/lagan-2.0/src/utils/cstat.c:251: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).
  analyze (myal, atoi (argv[2]), atoi (argv[3]));
data/lagan-2.0/src/utils/cstat.c:251: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).
  analyze (myal, atoi (argv[2]), atoi (argv[3]));
data/lagan-2.0/src/utils/dotplot.cpp:8: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 buffer[105];
data/lagan-2.0/src/utils/dotplot.cpp:27: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 (argv[1], "r");
data/lagan-2.0/src/utils/dotplot.cpp:43: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 (argv[1], "r");
data/lagan-2.0/src/utils/dotplot.cpp:78: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 (argv[1], "r");
data/lagan-2.0/src/utils/fa2xfa.c:9: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 name[1024], name2[1024], **seqs, **seqs2;
data/lagan-2.0/src/utils/fa2xfa.c:26: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 buffer[1024], ch;
data/lagan-2.0/src/utils/fa2xfa.c:29: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 (filename, "r"); assert (file);
data/lagan-2.0/src/utils/fa2xfa.c:43:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[1024], ch;
data/lagan-2.0/src/utils/fa2xfa.c:52: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 (filename, "r"); assert (file);
data/lagan-2.0/src/utils/fa2xfa.c:104:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  begin = atoi (argv[2])-1;
data/lagan-2.0/src/utils/fa2xfa.c:105:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  finish = atoi (strdup(argv[3]));
data/lagan-2.0/src/utils/fa2xfa.c:106:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  seqIdx = atoi (argv[4]);
data/lagan-2.0/src/utils/getbounds.c:14: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 buffer[1024], ch;
data/lagan-2.0/src/utils/getbounds.c:17: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 (filename, "r"); assert (file);
data/lagan-2.0/src/utils/getbounds.c:41: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 (argv[1], "r"); assert (file);
data/lagan-2.0/src/utils/getbounds.c:58: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 (argv[1], "r"); assert (file);
data/lagan-2.0/src/utils/getcontigpos.c:8: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 name[1024], name2[1024], **seqs, **seqs2;
data/lagan-2.0/src/utils/getcontigpos.c:12:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[1024], ch;
data/lagan-2.0/src/utils/getcontigpos.c:15: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 (filename, "r"); assert (file);
data/lagan-2.0/src/utils/getcontigpos.c:29: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 buffer[1024], ch;
data/lagan-2.0/src/utils/getcontigpos.c:38: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 (filename, "r"); assert (file);
data/lagan-2.0/src/utils/getcontigpos.c:87:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  finish = atoi (strdup(argv[2]));
data/lagan-2.0/src/utils/getlength.c:11: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 buffer[BUF_SIZE], ch;
data/lagan-2.0/src/utils/getlength.c:19: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 (argv[1], "r"); assert (file);
data/lagan-2.0/src/utils/getoverlap.c:15: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 (argv[1], "r"); assert (file);
data/lagan-2.0/src/utils/overlay.c:100: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 temp[1024];
data/lagan-2.0/src/utils/overlay.c:163: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).
  if (!(input = fopen (filename, "r"))) {
data/lagan-2.0/src/utils/overlay.c:182:19:  [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 (!(input = fopen (filename, "r"))) {
data/lagan-2.0/src/utils/overlay.c:230: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 string_tree[16537]; //noone will ever need more :)))
data/lagan-2.0/src/utils/rc.c:34: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 temp[256];
data/lagan-2.0/src/utils/scorealign.c:57: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 *dad[2], *state;
data/lagan-2.0/src/utils/scorealign.c:263: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 line[1024];
data/lagan-2.0/src/utils/scorealign.c:401: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 lets[256], line[1024];  
data/lagan-2.0/src/utils/scorealign.c:413: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 (line, "r"); assert (file);
data/lagan-2.0/src/utils/scorealign.c:447: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 (filename, "r"); assert (file);
data/lagan-2.0/src/utils/scorealign.c:463:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  cons_rate = atoi (argv[2]);
data/lagan-2.0/src/utils/scorecontigs.c:36:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char *names[MAX_SEQ];
data/lagan-2.0/src/utils/scorecontigs.c:39:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char *data[MAX_SEQ];
data/lagan-2.0/src/utils/scorecontigs.c:49: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 temp[1024];
data/lagan-2.0/src/utils/scorecontigs.c:78:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char temp[1024], currchar, *write;
data/lagan-2.0/src/utils/scorecontigs.c:118:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (!(alfile = fopen (filename, "r"))){
data/lagan-2.0/src/utils/scorecontigs.c:148: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 *traceback[2];
data/lagan-2.0/src/utils/scorecontigs.c:152: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 (filename, "r"); assert (file);
data/lagan-2.0/src/utils/scorecontigs.c:358: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 contignames[MAX_SEQ][1024];
data/lagan-2.0/src/utils/scorecontigs.c:368: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).
  PEN_1_MIS = -(25 * atoi(argv[4])) / (101 - atoi (argv[4]));
data/lagan-2.0/src/utils/scorecontigs.c:368: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).
  PEN_1_MIS = -(25 * atoi(argv[4])) / (101 - atoi (argv[4]));
data/lagan-2.0/src/utils/scorecontigs.c:377:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (!(filelist = fopen (argv[1], "r"))) {
data/lagan-2.0/src/utils/scorecontigs.c:395:11:  [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).
  cfile = fopen (argv[3], "w"); assert (cfile);
data/lagan-2.0/src/utils/scorecontigs.c:407: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).
  filelist = fopen (argv[2], "r"); assert (filelist);
data/lagan-2.0/src/utils/seqmerge.c:10: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 buffer[1024], ch;
data/lagan-2.0/src/utils/seqmerge.c:18:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file = fopen (argv[i], "r"); assert (file);
data/lagan-2.0/src/ancseq.cpp:56:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(buf)>0) fprintf(out,"%s\n",buf);
data/lagan-2.0/src/ancseq.cpp:102:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(line)==0) continue;
data/lagan-2.0/src/ancseq.cpp:444:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(line)==0) continue;
data/lagan-2.0/src/ancseqrest.cpp:116:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(line)==0) continue;
data/lagan-2.0/src/ancseqrest.cpp:243:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(line)>0) {
data/lagan-2.0/src/cutmfa.cpp:129:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(buf)==0) continue;
data/lagan-2.0/src/faindex.cpp:22:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(line)>0) {
data/lagan-2.0/src/fchaos.c:91: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).
  int length = strlen(a);
data/lagan-2.0/src/fchaos.c:349: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).
  myseq->name = (char*) malloc((strlen(temp))*sizeof(char));
data/lagan-2.0/src/fchaos.c:352:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  currchar = fgetc(input);
data/lagan-2.0/src/fchaos.c:365:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    currchar = fgetc(input);
data/lagan-2.0/src/fchaos.c:597:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ch = fgetc (file);
data/lagan-2.0/src/filebuffer.c:116: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).
  myseq->name = (char*) malloc((strlen(tempname))*sizeof(char));
data/lagan-2.0/src/glocal/score.cpp:71:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	for (i=0; (unsigned)i<strlen(line); i++) {
data/lagan-2.0/src/lagan2mfa.cpp:70:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(buf)==0) continue;
data/lagan-2.0/src/makecons.cpp:45: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).
	int i=strlen(s);
data/lagan-2.0/src/mlagan.c:85: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).
  myseq->name = (char*) malloc((strlen(temp))*sizeof(char));
data/lagan-2.0/src/mlagan.c:88:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  currchar = fgetc(input);
data/lagan-2.0/src/mlagan.c:101:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    currchar = fgetc(input);
data/lagan-2.0/src/mlagan.c:124: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).
  len = strlen(str);
data/lagan-2.0/src/mlagan.c:224: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).
  diff1 = (endpnt)? endpnt - name1: strlen(name1);
data/lagan-2.0/src/mlagan.c:226: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).
  diff2 = (endpnt)? endpnt - name2: strlen(name2);
data/lagan-2.0/src/mlagan.c:227:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (fname, name1, diff1);
data/lagan-2.0/src/mlagan.c:228:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (fname+diff1, name2, diff2);
data/lagan-2.0/src/mlagan.c:604: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).
    namelens[i] = strlen(simalign[i]->seqs[0]->name);
data/lagan-2.0/src/multial.c:435:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ch = fgetc (file);
data/lagan-2.0/src/order.c:66: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).
  myseq->name = (char*) malloc((strlen(temp))*sizeof(char));
data/lagan-2.0/src/order.c:70:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  currchar = fgetc(input);
data/lagan-2.0/src/order.c:82:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    currchar = fgetc(input);
data/lagan-2.0/src/order.c:120:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ch = fgetc (file);
data/lagan-2.0/src/prolagan.c:85: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).
  myseq->name = (char*) malloc((strlen(temp))*sizeof(char));
data/lagan-2.0/src/prolagan.c:88:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  currchar = fgetc(input);
data/lagan-2.0/src/prolagan.c:101:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    currchar = fgetc(input);
data/lagan-2.0/src/prolagan.c:124: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).
  len = strlen(str);
data/lagan-2.0/src/prolagan.c:309: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).
  diff1 = (endpnt)? endpnt - name1: strlen(name1);
data/lagan-2.0/src/prolagan.c:311: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).
  diff2 = (endpnt)? endpnt - name2: strlen(name2);
data/lagan-2.0/src/prolagan.c:312:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (fname, name1, diff1);
data/lagan-2.0/src/prolagan.c:313:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (fname+diff1, name2, diff2);
data/lagan-2.0/src/translate.c:63: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).
  resseq->name = (char*) malloc(strlen(theseq->name)+5);
data/lagan-2.0/src/util.cpp:5: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).
	int i=strlen(s);
data/lagan-2.0/src/utils/Glue.cpp:45:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for (i = 0; i < (int) strlen (line); i++){
data/lagan-2.0/src/utils/Glue.cpp:52:5:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
    fscanf (file, "%1s", &(line[0]));
data/lagan-2.0/src/utils/Glue.cpp:80:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for (i = 0; i < (int) strlen (alpha); i++){
data/lagan-2.0/src/utils/Glue.cpp:81: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).
    for (j = 0; j < (int) strlen (alpha); j++){
data/lagan-2.0/src/utils/Glue.cpp:84:40:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	(i == j) ? (int)(match * 100) : (int)(mismatch * 100);
data/lagan-2.0/src/utils/bin2bl.c:72:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(snp_fname, argv[param1], slash - argv[param1] + 1);
data/lagan-2.0/src/utils/bin2bl.c:79:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((bp = getc(infile)) == EOF) {  // get next char
data/lagan-2.0/src/utils/bin2bl.c:119:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      html_length = strlen(line1);
data/lagan-2.0/src/utils/bin2bl.c:122: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).
      line1[html_length + strlen(dash) + 1] = snp_bases[1];
data/lagan-2.0/src/utils/bin2bl.c:123: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).
      strcpy(line1 + html_length + strlen(dash) + 2, status_end);
data/lagan-2.0/src/utils/bin2bl.c:124:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      html_length = strlen(line1);
data/lagan-2.0/src/utils/bin2bl.c:127:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      html_length = strlen(line1);
data/lagan-2.0/src/utils/bin2bl.c:165:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  space = length + 9 - strlen(line) - strlen(tick);
data/lagan-2.0/src/utils/bin2bl.c:165: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).
  space = length + 9 - strlen(line) - strlen(tick);
data/lagan-2.0/src/utils/bin2bl.c:168:7:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
      strcat(line, " ");
data/lagan-2.0/src/utils/bin2mf.c:32:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((bp = getc(infile)) == EOF) {  // get next char
data/lagan-2.0/src/utils/cextract.c:18:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ch = fgetc (file);
data/lagan-2.0/src/utils/cextract.c:34:3:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
  strcpy (name, "");
data/lagan-2.0/src/utils/cextract.c:42: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 (name) == 0) strcpy (name, buffer);
data/lagan-2.0/src/utils/cextract.c:51:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      ch = fgetc (file);
data/lagan-2.0/src/utils/contigorder.c:28:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while (fgetc (file) != '\n');
data/lagan-2.0/src/utils/contigorder.c:65:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while (fgetc (file) != '\n');
data/lagan-2.0/src/utils/cstat.c:50:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    currchar = fgetc(input);
data/lagan-2.0/src/utils/cstat.c:72: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).
  myal->names[seqnum] = (char*) malloc((strlen(temp))*sizeof(char));
data/lagan-2.0/src/utils/cstat.c:76:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  currchar = fgetc(input);
data/lagan-2.0/src/utils/cstat.c:91:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    currchar = fgetc(input);
data/lagan-2.0/src/utils/fa2xfa.c:32:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ch = fgetc (file);
data/lagan-2.0/src/utils/fa2xfa.c:48:3:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
  strcpy (name, "");
data/lagan-2.0/src/utils/fa2xfa.c:56: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 (name) == 0) strcpy (name, buffer);
data/lagan-2.0/src/utils/fa2xfa.c:65:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      ch = fgetc (file);
data/lagan-2.0/src/utils/getbounds.c:20:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ch = fgetc (file);
data/lagan-2.0/src/utils/getcontigpos.c:18:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ch = fgetc (file);
data/lagan-2.0/src/utils/getcontigpos.c:34:3:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
  strcpy (name, "");
data/lagan-2.0/src/utils/getcontigpos.c:42: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 (name) == 0) strcpy (name, buffer);
data/lagan-2.0/src/utils/getcontigpos.c:51:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      ch = fgetc (file);
data/lagan-2.0/src/utils/overlay.c:116:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  currchar = fgetc(input);
data/lagan-2.0/src/utils/overlay.c:130:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    currchar = fgetc(input);
data/lagan-2.0/src/utils/overlay.c:133:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    allseqs[target]->seqname = malloc (strlen(temp)+1);
data/lagan-2.0/src/utils/overlay.c:134:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(allseqs[target]->seqname, temp, strlen(temp)+1);
data/lagan-2.0/src/utils/overlay.c:134:45:  [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(allseqs[target]->seqname, temp, strlen(temp)+1);
data/lagan-2.0/src/utils/overlay.c:140:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (!strncmp(allseqs[i]->seqname, temp, strlen(temp))) {
data/lagan-2.0/src/utils/rc.c:48:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  currchar = fgetc(stdin);
data/lagan-2.0/src/utils/rc.c:56:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    currchar = fgetc(stdin);
data/lagan-2.0/src/utils/scorealign.c:186:7:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
      strcpy (seqcomment[i], "");
data/lagan-2.0/src/utils/scorealign.c:191:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (seqcomment[i][strlen(seqcomment[i]) - 1] == '\n')
data/lagan-2.0/src/utils/scorealign.c:192:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      seqcomment[i][strlen(seqcomment[i]) - 1] = '\0';
data/lagan-2.0/src/utils/scorealign.c:251:5:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
    strcpy (*sc, "");
data/lagan-2.0/src/utils/scorealign.c:254:5:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
    strcpy (*sc, "");
data/lagan-2.0/src/utils/scorealign.c:276:34:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    buffer[charsread] = toupper (fgetc (file));
data/lagan-2.0/src/utils/scorealign.c:389: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).
  for (i = 0; i < strlen (alpha); i++){
data/lagan-2.0/src/utils/scorealign.c:390:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    for (j = 0; j < strlen (alpha); j++){
data/lagan-2.0/src/utils/scorealign.c:392:40:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	(i == j) ? (int)(match * 100) : (int)(mismatch * 100);
data/lagan-2.0/src/utils/scorealign.c:416: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).
  for (i = 0; i < strlen (line); i++){
data/lagan-2.0/src/utils/scorealign.c:423:5:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
    fscanf (file, "%1s", &(line[0]));
data/lagan-2.0/src/utils/scorecontigs.c:60:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  currchar = fgetc(input);
data/lagan-2.0/src/utils/scorecontigs.c:69:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    currchar = fgetc(input);
data/lagan-2.0/src/utils/scorecontigs.c:86:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  res->names[res->numseqs] = (char*) malloc((strlen(temp))*sizeof(char));
data/lagan-2.0/src/utils/scorecontigs.c:92:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  currchar = fgetc (input);
data/lagan-2.0/src/utils/scorecontigs.c:99:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    currchar = fgetc (input);
data/lagan-2.0/src/utils/seqmerge.c:23:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      ch = fgetc (file);

ANALYSIS SUMMARY:

Hits = 402
Lines analyzed = 15311 in approximately 0.70 seconds (21888 lines/second)
Physical Source Lines of Code (SLOC) = 11803
Hits@level = [0] 502 [1] 100 [2] 239 [3]   9 [4]  54 [5]   0
Hits@level+ = [0+] 904 [1+] 402 [2+] 302 [3+]  63 [4+]  54 [5+]   0
Hits/KSLOC@level+ = [0+] 76.5907 [1+] 34.0591 [2+] 25.5867 [3+] 5.33763 [4+] 4.57511 [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.