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/trnascan-se-2.0.7+ds/src/fast-dbviterbi.c
Examining data/trnascan-se-2.0.7+ds/src/trnascan.c
Examining data/trnascan-se-2.0.7+ds/src/build_main.c
Examining data/trnascan-se-2.0.7+ds/src/funcs.h
Examining data/trnascan-se-2.0.7+ds/src/stack.c
Examining data/trnascan-se-2.0.7+ds/src/selex.c
Examining data/trnascan-se-2.0.7+ds/src/getopt.c
Examining data/trnascan-se-2.0.7+ds/src/debug.c
Examining data/trnascan-se-2.0.7+ds/src/sre_ctype.c
Examining data/trnascan-se-2.0.7+ds/src/shuffle_main.c
Examining data/trnascan-se-2.0.7+ds/src/sqfuncs.h
Examining data/trnascan-se-2.0.7+ds/src/emit_main.c
Examining data/trnascan-se-2.0.7+ds/src/maspar.h
Examining data/trnascan-se-2.0.7+ds/src/mpcovels_main.c
Examining data/trnascan-se-2.0.7+ds/src/structs.h
Examining data/trnascan-se-2.0.7+ds/src/konings.c
Examining data/trnascan-se-2.0.7+ds/src/lengthdist.c
Examining data/trnascan-se-2.0.7+ds/src/maxmodelmaker.c
Examining data/trnascan-se-2.0.7+ds/src/prior.h
Examining data/trnascan-se-2.0.7+ds/src/align.c
Examining data/trnascan-se-2.0.7+ds/src/model.c
Examining data/trnascan-se-2.0.7+ds/src/smallviterbi.c
Examining data/trnascan-se-2.0.7+ds/src/gnuregex.h
Examining data/trnascan-se-2.0.7+ds/src/align_main.c
Examining data/trnascan-se-2.0.7+ds/src/dbviterbi.c
Examining data/trnascan-se-2.0.7+ds/src/scorestack.c
Examining data/trnascan-se-2.0.7+ds/src/reformat_main.c
Examining data/trnascan-se-2.0.7+ds/src/modelmaking.c
Examining data/trnascan-se-2.0.7+ds/src/sre_math.c
Examining data/trnascan-se-2.0.7+ds/src/iupac.c
Examining data/trnascan-se-2.0.7+ds/src/alignio.c
Examining data/trnascan-se-2.0.7+ds/src/dbmalloc.h
Examining data/trnascan-se-2.0.7+ds/src/squid.h
Examining data/trnascan-se-2.0.7+ds/src/fastmodelmaker.c
Examining data/trnascan-se-2.0.7+ds/src/version.h
Examining data/trnascan-se-2.0.7+ds/src/viterbi.c
Examining data/trnascan-se-2.0.7+ds/src/msf.c
Examining data/trnascan-se-2.0.7+ds/src/revcomp.c
Examining data/trnascan-se-2.0.7+ds/src/eufind_main.c
Examining data/trnascan-se-2.0.7+ds/src/interleaved.c
Examining data/trnascan-se-2.0.7+ds/src/sqio.c
Examining data/trnascan-se-2.0.7+ds/src/types.c
Examining data/trnascan-se-2.0.7+ds/src/sre_string.c
Examining data/trnascan-se-2.0.7+ds/src/eufind_const.h
Examining data/trnascan-se-2.0.7+ds/src/revcomp_main.c
Examining data/trnascan-se-2.0.7+ds/src/pavesi.c
Examining data/trnascan-se-2.0.7+ds/src/emit.c
Examining data/trnascan-se-2.0.7+ds/src/score_main.c
Examining data/trnascan-se-2.0.7+ds/src/trace.c
Examining data/trnascan-se-2.0.7+ds/src/gnuregex.c
Examining data/trnascan-se-2.0.7+ds/src/scan_main.c
Examining data/trnascan-se-2.0.7+ds/src/seqstat_main.c
Examining data/trnascan-se-2.0.7+ds/src/prior.c
Examining data/trnascan-se-2.0.7+ds/src/save.c
Examining data/trnascan-se-2.0.7+ds/src/sqerror.c
Examining data/trnascan-se-2.0.7+ds/src/structcheck_main.c
Examining data/trnascan-se-2.0.7+ds/src/probify.c
Examining data/trnascan-se-2.0.7+ds/src/misc.c
Examining data/trnascan-se-2.0.7+ds/src/structs.c
Examining data/trnascan-se-2.0.7+ds/src/train_main.c

FINAL RESULTS:

data/trnascan-se-2.0.7+ds/src/dbmalloc.h:410:8:  [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).
#ifdef strcpy
data/trnascan-se-2.0.7+ds/src/dbmalloc.h:411:8:  [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).
#undef strcpy
data/trnascan-se-2.0.7+ds/src/dbmalloc.h:413:8:  [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).
#ifdef strcpy
data/trnascan-se-2.0.7+ds/src/dbmalloc.h:418:9:  [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).
#define strcat(str1,str2)	  DBstrcat(__FILE__,__LINE__,str1,str2)
data/trnascan-se-2.0.7+ds/src/dbmalloc.h:421:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
#define strcpy(str1,str2)	  DBstrcpy(__FILE__, __LINE__, str1, str2)
data/trnascan-se-2.0.7+ds/src/gnuregex.c:458:36:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define DEBUG_PRINT1(x) if (debug) printf (x)
data/trnascan-se-2.0.7+ds/src/gnuregex.c:459:41:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define DEBUG_PRINT2(x1, x2) if (debug) printf (x1, x2)
data/trnascan-se-2.0.7+ds/src/gnuregex.c:460:45:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define DEBUG_PRINT3(x1, x2, x3) if (debug) printf (x1, x2, x3)
data/trnascan-se-2.0.7+ds/src/gnuregex.c:461:49:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define DEBUG_PRINT4(x1, x2, x3, x4) if (debug) printf (x1, x2, x3, x4)
data/trnascan-se-2.0.7+ds/src/gnuregex.c:4894:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy (errbuf, msg);
data/trnascan-se-2.0.7+ds/src/interleaved.c:328: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(bufcpy, buffer);
data/trnascan-se-2.0.7+ds/src/pavesi.c:403: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(tRNA->iso_type,stdcode3[codon]);
data/trnascan-se-2.0.7+ds/src/selex.c:104: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(bufcpy, buffer);
data/trnascan-se-2.0.7+ds/src/selex.c:171:6:  [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(bufcpy, buffer);
data/trnascan-se-2.0.7+ds/src/selex.c:196: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(bufcpy, buffer);
data/trnascan-se-2.0.7+ds/src/selex.c:259: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(bufcpy, buffer);
data/trnascan-se-2.0.7+ds/src/selex.c:371:8:  [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(bufcpy, buffer);
data/trnascan-se-2.0.7+ds/src/selex.c:384: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(bufcpy, buffer);
data/trnascan-se-2.0.7+ds/src/sqerror.c:41:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf(stderr, format, argp);
data/trnascan-se-2.0.7+ds/src/sqerror.c:68:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf(stderr, format, argp);
data/trnascan-se-2.0.7+ds/src/sqio.c:172:34:  [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 (sq2->flags & SQINFO_NAME)  strcpy(sq1->name, sq2->name);
data/trnascan-se-2.0.7+ds/src/sqio.c:173:34:  [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 (sq2->flags & SQINFO_ID)    strcpy(sq1->id,   sq2->id);
data/trnascan-se-2.0.7+ds/src/sqio.c:174:34:  [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 (sq2->flags & SQINFO_ACC)   strcpy(sq1->acc,  sq2->acc);
data/trnascan-se-2.0.7+ds/src/sqio.c:175:34:  [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 (sq2->flags & SQINFO_DESC)  strcpy(sq1->desc, sq2->desc);
data/trnascan-se-2.0.7+ds/src/sqio.c:1718:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(full, "%s/%s", path, fname);
data/trnascan-se-2.0.7+ds/src/sre_string.c:52: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(new, s);
data/trnascan-se-2.0.7+ds/src/sre_string.c:227: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(s1, s2);
data/trnascan-se-2.0.7+ds/src/train_main.c:294:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(animationfile, "%s%d", animateroot, iteration);
data/trnascan-se-2.0.7+ds/src/trnascan.c:487:1:  [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(tscan_dir,TSCANDIR);
data/trnascan-se-2.0.7+ds/src/trnascan.c:498:1:  [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(tscan_dir,TSCANDIR);
data/trnascan-se-2.0.7+ds/src/align_main.c:87:18:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optc = getopt(argc, argv, OPTIONS)) != -1)
data/trnascan-se-2.0.7+ds/src/build_main.c:99:18:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optc = getopt(argc, argv, OPTIONS)) != -1)
data/trnascan-se-2.0.7+ds/src/emit_main.c:73:18:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optc = getopt(argc, argv, OPTIONS)) != -1)
data/trnascan-se-2.0.7+ds/src/eufind_main.c:106:21:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optchar = getopt(argc, argv, OPTIONS)) != -1)
data/trnascan-se-2.0.7+ds/src/mpcovels_main.c:103:18:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optc = getopt(argc, argv, OPTIONS)) != -1)
data/trnascan-se-2.0.7+ds/src/reformat_main.c:98:21:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optchar = getopt(argc, argv, OPTIONS)) != -1)
data/trnascan-se-2.0.7+ds/src/revcomp_main.c:45:21:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optchar = getopt(argc, argv, OPTIONS)) != -1)
data/trnascan-se-2.0.7+ds/src/scan_main.c:100:18:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optc = getopt(argc, argv, OPTIONS)) != -1)
data/trnascan-se-2.0.7+ds/src/score_main.c:87:18:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optc = getopt(argc, argv, OPTIONS)) != -1)
data/trnascan-se-2.0.7+ds/src/seqstat_main.c:58:21:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optchar = getopt(argc, argv, OPTIONS)) != -1)
data/trnascan-se-2.0.7+ds/src/sqio.c:1716: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.
  if ((path = getenv(env)) == NULL) return NULL;
data/trnascan-se-2.0.7+ds/src/structcheck_main.c:95:18:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optc = getopt(argc, argv, OPTIONS)) != -1)
data/trnascan-se-2.0.7+ds/src/train_main.c:116:18:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optc = getopt(argc, argv, OPTIONS)) != -1)
data/trnascan-se-2.0.7+ds/src/trnascan.c:433:16:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
while ((optc = getopt(argc, argv, "csraho:v:i:")) != -1)
data/trnascan-se-2.0.7+ds/src/align.c:423:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
      strcpy(ainfo->au, "CM RNA automatic alignment");
data/trnascan-se-2.0.7+ds/src/align_main.c:132: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 ((ofp = fopen(outfile, "w")) == NULL)
data/trnascan-se-2.0.7+ds/src/align_main.c:136: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 ((sfp = fopen(scorefile, "w")) == NULL)
data/trnascan-se-2.0.7+ds/src/alignio.c:150: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 sname1[11];              /* shortened name               */
data/trnascan-se-2.0.7+ds/src/alignio.c:151: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 sname2[11];             
data/trnascan-se-2.0.7+ds/src/alignio.c:153: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 buf1[61];		/* buffer for writing seq1; CPL+1*/
data/trnascan-se-2.0.7+ds/src/alignio.c:154: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 bufmid[61];              /* buffer for writing consensus  */
data/trnascan-se-2.0.7+ds/src/alignio.c:155: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 buf2[61];
data/trnascan-se-2.0.7+ds/src/build_main.c:157: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 ((prifp = fopen(prifile, "r")) == NULL)
data/trnascan-se-2.0.7+ds/src/build_main.c:293:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((cmfp = fopen(cmfile, "w")) == NULL)
data/trnascan-se-2.0.7+ds/src/build_main.c:301: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 ((structfp = fopen(structfile, "w")) == NULL)
data/trnascan-se-2.0.7+ds/src/dbmalloc.h:375:8:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#ifdef bcopy
data/trnascan-se-2.0.7+ds/src/dbmalloc.h:376:8:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#undef bcopy
data/trnascan-se-2.0.7+ds/src/dbmalloc.h:387:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define memcpy(ptr1,ptr2,len)     DBmemcpy(__FILE__, __LINE__, ptr1, ptr2, len)
data/trnascan-se-2.0.7+ds/src/dbmalloc.h:390:9:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define bcopy(ptr2,ptr1,len)      DBbcopy(__FILE__,__LINE__,ptr2,ptr1,len)
data/trnascan-se-2.0.7+ds/src/dbviterbi.c:251:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(amx[0][diag], amx[0][0], statenum * sizeof(int));
data/trnascan-se-2.0.7+ds/src/dbviterbi.c:252:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(amx[1][diag], amx[0][0], statenum * sizeof(int));
data/trnascan-se-2.0.7+ds/src/dbviterbi.c:261: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(bmx[0][j], bmx[0][0], (window+1) * sizeof(int));
data/trnascan-se-2.0.7+ds/src/dbviterbi.c:266:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(bmx[y][j], bmx[0][0], (window+1) * sizeof(int));
data/trnascan-se-2.0.7+ds/src/emit_main.c:79:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    case 's': seed = atoi(optarg);  break;
data/trnascan-se-2.0.7+ds/src/eufind_const.h: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 iso_type[5];
data/trnascan-se-2.0.7+ds/src/eufind_const.h:37: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 acodon[4];
data/trnascan-se-2.0.7+ds/src/eufind_main.c:132:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  else if ((outfp = fopen(outfile, "w")) == NULL)
data/trnascan-se-2.0.7+ds/src/eufind_main.c:210:4:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	  strcpy(tRNA->acodon,"TCA");
data/trnascan-se-2.0.7+ds/src/fast-dbviterbi.c:263:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(amx[0][diag], amx[0][0], statenum * sizeof(int));
data/trnascan-se-2.0.7+ds/src/fast-dbviterbi.c:264:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(amx[1][diag], amx[0][0], statenum * sizeof(int));
data/trnascan-se-2.0.7+ds/src/fast-dbviterbi.c:273: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(bmx[0][j], bmx[0][0], (window+1) * sizeof(int));
data/trnascan-se-2.0.7+ds/src/fast-dbviterbi.c:278:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(bmx[y][j], bmx[0][0], (window+1) * sizeof(int));
data/trnascan-se-2.0.7+ds/src/gnuregex.c:51:9:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#ifndef bcopy
data/trnascan-se-2.0.7+ds/src/gnuregex.c:52:9:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define bcopy(s, d, n)	memcpy ((d), (s), (n))
data/trnascan-se-2.0.7+ds/src/gnuregex.c:52:24:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define bcopy(s, d, n)	memcpy ((d), (s), (n))
data/trnascan-se-2.0.7+ds/src/gnuregex.c:76:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char re_syntax_table[CHAR_SET_SIZE];
data/trnascan-se-2.0.7+ds/src/gnuregex.c:199:4:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   bcopy (source, destination, osize),					\
data/trnascan-se-2.0.7+ds/src/gnuregex.c:1427:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                    char str[CHAR_CLASS_MAX_LENGTH + 1];
data/trnascan-se-2.0.7+ds/src/gnuregex.c:2208:28:  [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.
  range_start = ((unsigned char *) p)[-2];
data/trnascan-se-2.0.7+ds/src/gnuregex.c:2209:28:  [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.
  range_end   = ((unsigned char *) p)[0];
data/trnascan-se-2.0.7+ds/src/gnuregex.c:4667:11:  [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.
  return (char *) re_error_msg[(int) ret];
data/trnascan-se-2.0.7+ds/src/interleaved.c:130: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[LINEBUFLEN];
data/trnascan-se-2.0.7+ds/src/interleaved.c:165: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[LINEBUFLEN];
data/trnascan-se-2.0.7+ds/src/interleaved.c:259: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[LINEBUFLEN];	/* input buffer for lines       */
data/trnascan-se-2.0.7+ds/src/interleaved.c:260: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     bufcpy[LINEBUFLEN];	/* copy of buffer for strtok    */
data/trnascan-se-2.0.7+ds/src/interleaved.c:285:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fp = fopen(seqfile, "r");
data/trnascan-se-2.0.7+ds/src/iupac.c:60: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 *stdcode1[65] = {
data/trnascan-se-2.0.7+ds/src/iupac.c:131: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 *stdcode3[65] = {
data/trnascan-se-2.0.7+ds/src/maxmodelmaker.c:109:39:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define copy_transtable(tomx, frommx) memcpy((void *) tomx, (void *) frommx, sizeof(double) * STATETYPES * STATETYPES)
data/trnascan-se-2.0.7+ds/src/maxmodelmaker.c:110:39:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define copy_singlet(tovec, fromvec)  memcpy((void *) tovec, (void *) fromvec, sizeof(double) * ALPHASIZE)
data/trnascan-se-2.0.7+ds/src/maxmodelmaker.c:111:39:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define copy_pairwise(tomx, frommx)   memcpy((void *) tomx, (void *) frommx, sizeof(double) * ALPHASIZE * ALPHASIZE)
data/trnascan-se-2.0.7+ds/src/model.c:621: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(pcm[y].emit, cm->nd[k].mp_emit, sizeof(double) * ALPHASIZE * ALPHASIZE);
data/trnascan-se-2.0.7+ds/src/model.c:630: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(pcm[y].emit, cm->nd[k].ml_emit, sizeof(double) * ALPHASIZE);
data/trnascan-se-2.0.7+ds/src/model.c:639: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(pcm[y].emit, cm->nd[k].mr_emit, sizeof(double) * ALPHASIZE);
data/trnascan-se-2.0.7+ds/src/model.c:648: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(pcm[y].emit, cm->nd[k].il_emit, sizeof(double) * ALPHASIZE);
data/trnascan-se-2.0.7+ds/src/model.c:657: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(pcm[y].emit, cm->nd[k].ir_emit, sizeof(double) * ALPHASIZE);
data/trnascan-se-2.0.7+ds/src/mpcovels_main.c:134:33:  [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 != NULL && (ofp = fopen(outfile, "w")) == NULL)
data/trnascan-se-2.0.7+ds/src/mpcovels_main.c:138:37:  [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 (donefile != NULL && (donefp = fopen(donefile, "w")) == NULL)
data/trnascan-se-2.0.7+ds/src/mpcovels_main.c:265:20:  [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 ((rev = (char *) malloc (sizeof(char) * (sqinfo[y].len + 1))) == NULL)
data/trnascan-se-2.0.7+ds/src/mpcovels_main.c:316: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 ((actfp = fopen(activefile, "w")) == NULL)
data/trnascan-se-2.0.7+ds/src/msf.c:50: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[51];		/* buffer for writing seq        */
data/trnascan-se-2.0.7+ds/src/msf.c:157:26:  [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 ((aseqs[idx] = (char *) realloc (aseqs[idx], sizeof(char) * (alen+1))) == NULL)
data/trnascan-se-2.0.7+ds/src/pavesi.c:94:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
  strcpy(tRNA->iso_type,"???");
data/trnascan-se-2.0.7+ds/src/pavesi.c:95:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
  strcpy(tRNA->acodon,"???");
data/trnascan-se-2.0.7+ds/src/pavesi.c:190:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
      strcpy(tRNA->iso_type,"SeCe");
data/trnascan-se-2.0.7+ds/src/pavesi.c:215:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
      strcpy(tRNA->iso_type,"SeCp");
data/trnascan-se-2.0.7+ds/src/pavesi.c:385: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 codon_seq[4];
data/trnascan-se-2.0.7+ds/src/pavesi.c:447:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(tRNA->acodon,"TCA");
data/trnascan-se-2.0.7+ds/src/prior.c:345:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char stripbuffer[512];	/* buffer with comments removed */
data/trnascan-se-2.0.7+ds/src/prior.c:346: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[512];
data/trnascan-se-2.0.7+ds/src/save.c:149: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[512];
data/trnascan-se-2.0.7+ds/src/save.c:154:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fp = fopen(filename, "r")) == NULL)
data/trnascan-se-2.0.7+ds/src/scan_main.c:107:31:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    case 'w': window        = atoi(optarg);          break;
data/trnascan-se-2.0.7+ds/src/scan_main.c:162: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 ((ext_ofp = fopen(outfile, "w")) == NULL)
data/trnascan-se-2.0.7+ds/src/scan_main.c:231:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  if ((dfp = fopen(donefile, "w")) == NULL)
data/trnascan-se-2.0.7+ds/src/scan_main.c:253: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 ((dfp = fopen(donefile, "w")) == NULL)
data/trnascan-se-2.0.7+ds/src/score_main.c:58: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[61];		/* output buffer for structures   */
data/trnascan-se-2.0.7+ds/src/selex.c:69: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[LINEBUFLEN];	/* input buffer for lines       */
data/trnascan-se-2.0.7+ds/src/selex.c:70: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     bufcpy[LINEBUFLEN];	/* strtok'able copy of buffer   */
data/trnascan-se-2.0.7+ds/src/selex.c:95:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fp = fopen(seqfile, "r");
data/trnascan-se-2.0.7+ds/src/selex.c:485: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];     	/* buffer for writing seq        */
data/trnascan-se-2.0.7+ds/src/selex.c:721: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[LINEBUFLEN];
data/trnascan-se-2.0.7+ds/src/selex.c:726:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fp = fopen(filename, "r")) == NULL)
data/trnascan-se-2.0.7+ds/src/selex.c:777: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 newname[32];
data/trnascan-se-2.0.7+ds/src/selex.c:782:9:  [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.
	(void) sprintf(newname, "%d", idx);
data/trnascan-se-2.0.7+ds/src/shuffle_main.c:65:57:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      if      (strcmp(optname, "-n")     == 0) { num  = atoi(optarg); }
data/trnascan-se-2.0.7+ds/src/shuffle_main.c:66:57:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      else if (strcmp(optname, "--seed") == 0) { seed = atoi(optarg); }
data/trnascan-se-2.0.7+ds/src/smallviterbi.c:370:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(amx[0][diag], amx[0][0], statenum * sizeof(int));
data/trnascan-se-2.0.7+ds/src/smallviterbi.c:371:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(amx[1][diag], amx[0][0], statenum * sizeof(int));
data/trnascan-se-2.0.7+ds/src/smallviterbi.c:388: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(bmx[0][j], bmx[0][N], (j+1) * sizeof(int));
data/trnascan-se-2.0.7+ds/src/smallviterbi.c:393:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(bmx[y][j], bmx[0][N], (j+1) * sizeof(int));
data/trnascan-se-2.0.7+ds/src/sqio.c:58:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char  allsymbols[32]  = "_.-*?<>{}[]()!@#$%^&=+;:'|`~\"\\";
data/trnascan-se-2.0.7+ds/src/sqio.c:137:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    sqinfo->start = atoi(sptr);
data/trnascan-se-2.0.7+ds/src/sqio.c:143:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    sqinfo->stop = atoi(sptr);
data/trnascan-se-2.0.7+ds/src/sqio.c:149:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    sqinfo->olen = atoi(sptr);
data/trnascan-se-2.0.7+ds/src/sqio.c:552: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).
    blen = atoi(lptr);
data/trnascan-se-2.0.7+ds/src/sqio.c:827: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 ((dbfp->f = fopen(filename, "r")) == NULL &&
data/trnascan-se-2.0.7+ds/src/sqio.c:1013: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  sp[LINEBUFLEN];
data/trnascan-se-2.0.7+ds/src/sqio.c:1021:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fseq = fopen(filename, "r")) == NULL &&
data/trnascan-se-2.0.7+ds/src/sqio.c:1265: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  endstr[10];
data/trnascan-se-2.0.7+ds/src/sqio.c:1266: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  s[100];			/* buffer for sequence  */
data/trnascan-se-2.0.7+ds/src/sqio.c:1267: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  ss[100];		/* buffer for structure */
data/trnascan-se-2.0.7+ds/src/sqio.c:1311:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
      strcpy(endstr, "\n//");
data/trnascan-se-2.0.7+ds/src/sqio.c:1346:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
      strcpy(endstr, "\n///");
data/trnascan-se-2.0.7+ds/src/sqio.c:1368:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
      strcpy(endstr, "\n++");
data/trnascan-se-2.0.7+ds/src/sqio.c:1379:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
      strcpy(endstr, "\n//"); /* 11Oct90: bug fix*/
data/trnascan-se-2.0.7+ds/src/sqio.c:1401:7:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
      strcpy(endstr, "\n//");
data/trnascan-se-2.0.7+ds/src/sqio.c:1605: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     magic[GSI_KEYSIZE];
data/trnascan-se-2.0.7+ds/src/sqio.c:1609: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 ((gsi->gsifp = fopen(gsifile, "r")) == NULL)
data/trnascan-se-2.0.7+ds/src/sqio.c:1639: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 name[GSI_KEYSIZE + 1];
data/trnascan-se-2.0.7+ds/src/sqio.c:1713: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  full[512];
data/trnascan-se-2.0.7+ds/src/sqio.c:1719:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fp = fopen(full, "r");
data/trnascan-se-2.0.7+ds/src/squid.h:55: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     name[SQINFO_NAMELEN];/* up to 63 characters of name           */
data/trnascan-se-2.0.7+ds/src/squid.h: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     id[SQINFO_NAMELEN];	/* up to 63 char of database identifier  */
data/trnascan-se-2.0.7+ds/src/squid.h: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     acc[SQINFO_NAMELEN]; /* up to 63 char of database accession # */
data/trnascan-se-2.0.7+ds/src/squid.h:58: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     desc[SQINFO_DESCLEN];/* up to 127 char of description         */
data/trnascan-se-2.0.7+ds/src/squid.h:122: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    sbuffer[LINEBUFLEN];	/* current line we're working on */
data/trnascan-se-2.0.7+ds/src/squid.h:221: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              au[64];	/* "author" information                     */
data/trnascan-se-2.0.7+ds/src/structcheck_main.c:301: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 ((ofp = fopen(outfile, "w")) == NULL)
data/trnascan-se-2.0.7+ds/src/train_main.c:81: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   animationfile[256];	/* full animation file name (root.1, etc.)      */
data/trnascan-se-2.0.7+ds/src/train_main.c:127:31:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    case 's': seed          = atoi(optarg); break;
data/trnascan-se-2.0.7+ds/src/train_main.c:173: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 ((prifp = fopen(prifile, "r")) == NULL)
data/trnascan-se-2.0.7+ds/src/train_main.c:295: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 ((animfp = fopen(animationfile, "w")) == NULL)
data/trnascan-se-2.0.7+ds/src/train_main.c:363: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 ((bckfp = fopen(bckfile, "w")) == NULL) 
data/trnascan-se-2.0.7+ds/src/train_main.c:379:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((cmfp = fopen(cmfile, "w")) == NULL)
data/trnascan-se-2.0.7+ds/src/trnascan.c:382: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 name[80]; /* character string containing the name of the sequence */
data/trnascan-se-2.0.7+ds/src/trnascan.c:383: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 tscan_dir[120];  /* holds name of directory of consensus files */
data/trnascan-se-2.0.7+ds/src/trnascan.c:442:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  case 'i': sqoffset = atoi(optarg)-1; break;
data/trnascan-se-2.0.7+ds/src/trnascan.c:462: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).
if ((fpi=fopen(seqfile,"r")) == NULL)
data/trnascan-se-2.0.7+ds/src/trnascan.c:473:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
else if ((fpo=fopen(outfile,"w")) == NULL) {
data/trnascan-se-2.0.7+ds/src/trnascan.c:480:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fpverb=fopen(verbfile,"w")) == NULL) {
data/trnascan-se-2.0.7+ds/src/trnascan.c:489:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
if (((fpcons1=fopen("TPCsignal","r")) == NULL) &&
data/trnascan-se-2.0.7+ds/src/trnascan.c:490:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    ((fpcons1=fopen(strcat(tscan_dir,"/TPCsignal"),"r")) == NULL))
data/trnascan-se-2.0.7+ds/src/trnascan.c:490:21:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
    ((fpcons1=fopen(strcat(tscan_dir,"/TPCsignal"),"r")) == NULL))
data/trnascan-se-2.0.7+ds/src/trnascan.c:500:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
if (((fpcons2=fopen("Dsignal","r")) == NULL) &&
data/trnascan-se-2.0.7+ds/src/trnascan.c:501:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    ((fpcons2=fopen(strcat(tscan_dir,"/Dsignal"),"r")) == NULL))
data/trnascan-se-2.0.7+ds/src/trnascan.c:501:21:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
    ((fpcons2=fopen(strcat(tscan_dir,"/Dsignal"),"r")) == NULL))
data/trnascan-se-2.0.7+ds/src/trnascan.c:858: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 chaine2[300]; /* character string containing the predicted tRNA gene
data/trnascan-se-2.0.7+ds/src/trnascan.c:860: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 anticodon[4]; /* character string containing the anticodon signal
data/trnascan-se-2.0.7+ds/src/trnascan.c:862: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 type_trna[4]; /* character string containing the tRNA gene family */
data/trnascan-se-2.0.7+ds/src/trnascan.c:1205: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 line[MAXLINE]; /* character string used to read a line */
data/trnascan-se-2.0.7+ds/src/trnascan.c:1333: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 line[MAXLINE]; /* character string used to read a line */
data/trnascan-se-2.0.7+ds/src/trnascan.c:1665: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 base[5]; /* character string containing the 4 bases A, C, G and T */
data/trnascan-se-2.0.7+ds/src/trnascan.c:1666: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 temp1[2], temp2[2]; /* temporary tables */
data/trnascan-se-2.0.7+ds/src/viterbi.c:268:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(amx[j][diag], amx[0][0], statenum * sizeof(int));
data/trnascan-se-2.0.7+ds/src/viterbi.c:275: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(bmx[0][j], bmx[0][N], (j+1) * sizeof(int));
data/trnascan-se-2.0.7+ds/src/viterbi.c:280:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(bmx[y][j], bmx[0][N], (j+1) * sizeof(int));
data/trnascan-se-2.0.7+ds/src/alignio.c:82:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (rpos != strlen(ss))
data/trnascan-se-2.0.7+ds/src/alignio.c:118:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (alen != strlen(ss))
data/trnascan-se-2.0.7+ds/src/alignio.c:162:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(sname1, name1, 10);
data/trnascan-se-2.0.7+ds/src/alignio.c:166:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(sname2, name2, 10);
data/trnascan-se-2.0.7+ds/src/alignio.c:181:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(buf1, s1, 60); buf1[60] = '\0';
data/trnascan-se-2.0.7+ds/src/alignio.c:182:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(buf2, s2, 60); buf2[60] = '\0';
data/trnascan-se-2.0.7+ds/src/alignio.c:183: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).
      count1 = strlen(buf1);
data/trnascan-se-2.0.7+ds/src/alignio.c:184: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).
      count2 = strlen(buf2);
data/trnascan-se-2.0.7+ds/src/alignio.c:348: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).
      rlen[idx] = strlen(rseqs[idx]);
data/trnascan-se-2.0.7+ds/src/dbmalloc.h:426: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).
#define strlen(str1)		  DBstrlen(__FILE__, __LINE__, str1)
data/trnascan-se-2.0.7+ds/src/dbmalloc.h:427:9:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
#define strncat(str1,str2,len)	  DBstrncat(__FILE__, __LINE__, str1,str2,len)
data/trnascan-se-2.0.7+ds/src/dbmalloc.h:428:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
#define strncpy(str1,str2,len)	  DBstrncpy(__FILE__,__LINE__,str1,str2,len)
data/trnascan-se-2.0.7+ds/src/dbviterbi.c:74: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).
  N = strlen(seq);
data/trnascan-se-2.0.7+ds/src/fast-dbviterbi.c:85: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).
  N = strlen(seq);
data/trnascan-se-2.0.7+ds/src/getopt.c:95: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).
      arglen = strlen(argv[optind]);
data/trnascan-se-2.0.7+ds/src/getopt.c:180:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      else if (opt[opti].argtype == ARG_CHAR && strlen(*ret_optarg) != 1)
data/trnascan-se-2.0.7+ds/src/gnuregex.c:4664: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).
  ret = regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf);
data/trnascan-se-2.0.7+ds/src/gnuregex.c:4675:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int len = strlen (s);
data/trnascan-se-2.0.7+ds/src/gnuregex.c:4770: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).
  ret = regex_compile (pattern, strlen (pattern), syntax, preg);
data/trnascan-se-2.0.7+ds/src/gnuregex.c:4805:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int len = strlen (string);
data/trnascan-se-2.0.7+ds/src/gnuregex.c:4884:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  msg_size = strlen (msg) + 1; /* Includes the null.  */
data/trnascan-se-2.0.7+ds/src/gnuregex.c:4890:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy (errbuf, msg, errbuf_size - 1);
data/trnascan-se-2.0.7+ds/src/interleaved.c:146:60:  [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 (expected_name != NULL && strncmp(buf, expected_name, strlen(expected_name) == 0))
data/trnascan-se-2.0.7+ds/src/interleaved.c:216:60:  [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 (expected_name != NULL && strncmp(buf, expected_name, strlen(expected_name) == 0))
data/trnascan-se-2.0.7+ds/src/interleaved.c:357: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 (sptr = buffer + strlen(buffer) - 1; isspace(*sptr); sptr --)
data/trnascan-se-2.0.7+ds/src/msf.c:66: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).
    if ((len = strlen(ainfo->sqinfo[idx].name)) > namelen) 
data/trnascan-se-2.0.7+ds/src/msf.c:111:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(buffer, sqptr[idx], 50);
data/trnascan-se-2.0.7+ds/src/msf.c:113: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).
	  charcount = strlen(buffer);
data/trnascan-se-2.0.7+ds/src/msf.c:150:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  alen = strlen(aseqs[0]);
data/trnascan-se-2.0.7+ds/src/msf.c:152: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).
    if ((len = strlen(aseqs[idx])) > alen)
data/trnascan-se-2.0.7+ds/src/msf.c:159: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 (apos = strlen(aseqs[idx]); apos < alen; apos++)
data/trnascan-se-2.0.7+ds/src/pavesi.c:428:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(tRNA->acodon,acodonp+besti,3);
data/trnascan-se-2.0.7+ds/src/revcomp.c:38:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  bases = strlen(seq);
data/trnascan-se-2.0.7+ds/src/score_main.c:167:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      len = strlen(aseq);
data/trnascan-se-2.0.7+ds/src/score_main.c:171:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		  strncpy(buffer, aseq + apos - 1, 60);
data/trnascan-se-2.0.7+ds/src/score_main.c:173:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		  strncpy(buffer, khstruct + apos - 1, 60);
data/trnascan-se-2.0.7+ds/src/selex.c:158: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 (sptr = buffer + strlen(buffer) - 1;  
data/trnascan-se-2.0.7+ds/src/selex.c:265:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(ainfo->au,sptr,63);
data/trnascan-se-2.0.7+ds/src/selex.c:327:54:  [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 (! copy_alignment_line(ainfo->cs, currlen, strlen(nptr)-1, 
data/trnascan-se-2.0.7+ds/src/selex.c:335:54:  [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 (! copy_alignment_line(ainfo->rf, currlen, strlen(nptr)-1, 
data/trnascan-se-2.0.7+ds/src/selex.c:343:71:  [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 (! copy_alignment_line(ainfo->sqinfo[seqidx-1].ss, currlen, strlen(nptr)-1,
data/trnascan-se-2.0.7+ds/src/selex.c:352:71:  [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 (! copy_alignment_line(ainfo->sqinfo[seqidx-1].sa, currlen, strlen(nptr)-1,
data/trnascan-se-2.0.7+ds/src/selex.c:360:58:  [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 (! copy_alignment_line(aseqs[seqidx], currlen, strlen(nptr)-1, 
data/trnascan-se-2.0.7+ds/src/selex.c:491:54:  [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).
  alen = (ainfo->flags & AINFO_ALEN) ? ainfo->alen : strlen(aseqs[0]);
data/trnascan-se-2.0.7+ds/src/selex.c:496: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).
    if ((len = strlen(ainfo->sqinfo[idx].name)) > namelen) 
data/trnascan-se-2.0.7+ds/src/selex.c:543:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(buffer, ainfo->rf + currpos, cpl);
data/trnascan-se-2.0.7+ds/src/selex.c:551:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(buffer, ainfo->cs + currpos, cpl);
data/trnascan-se-2.0.7+ds/src/selex.c:559:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(buffer, aseqs[idx] + currpos, cpl);
data/trnascan-se-2.0.7+ds/src/selex.c:567:8:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	      strncpy(buffer, ss[idx] + currpos, cpl);
data/trnascan-se-2.0.7+ds/src/selex.c:575:8:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	      strncpy(buffer, sa[idx] + currpos, cpl);
data/trnascan-se-2.0.7+ds/src/selex.c:684: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).
      seqlen = strlen(aseqs[idx]);
data/trnascan-se-2.0.7+ds/src/smallviterbi.c:140: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).
  N = strlen(seq);
data/trnascan-se-2.0.7+ds/src/sqio.c:84:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for (pos = strlen(sptr)-1; pos >= 0; pos--)
data/trnascan-se-2.0.7+ds/src/sqio.c:92:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(sqinfo->name, sptr, SQINFO_NAMELEN-1);
data/trnascan-se-2.0.7+ds/src/sqio.c:101:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(sqinfo->id, sptr, SQINFO_NAMELEN-1);
data/trnascan-se-2.0.7+ds/src/sqio.c:110:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(sqinfo->acc, sptr, SQINFO_NAMELEN-1);
data/trnascan-se-2.0.7+ds/src/sqio.c:121:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    len = strlen(sqinfo->desc);
data/trnascan-se-2.0.7+ds/src/sqio.c:124:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
		strncat(sqinfo->desc, " ", SQINFO_DESCLEN-1-len); len++;
data/trnascan-se-2.0.7+ds/src/sqio.c:125:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
		strncat(sqinfo->desc, sptr, SQINFO_DESCLEN-1-len);
data/trnascan-se-2.0.7+ds/src/sqio.c:129:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(sqinfo->desc, sptr, SQINFO_DESCLEN-1);
data/trnascan-se-2.0.7+ds/src/sqio.c:1019:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (!done) { splen = (int) strlen(sp); ++nlines; } }
data/trnascan-se-2.0.7+ds/src/sqio.c:1275:61:  [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).
  seqlen     = (sqinfo->flags & SQINFO_LEN) ? sqinfo->len : strlen(seq);
data/trnascan-se-2.0.7+ds/src/sqio.c:1288: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( endstr,"");
data/trnascan-se-2.0.7+ds/src/sqio.c:1297: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(endstr,"\n"); /* end w/ extra blank line */
data/trnascan-se-2.0.7+ds/src/sqio.c:1329: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(endstr,"*");
data/trnascan-se-2.0.7+ds/src/sqio.c:1394: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(endstr, "\n");  /* this is insurance to help prevent misreads at eof */
data/trnascan-se-2.0.7+ds/src/sqio.c:1415: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(endstr,"1"); /* == linear dna */
data/trnascan-se-2.0.7+ds/src/sqio.c:1717:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (((int) strlen(fname) + (int) strlen(env) + 2) > 512) return NULL;
data/trnascan-se-2.0.7+ds/src/sqio.c:1717: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).
  if (((int) strlen(fname) + (int) strlen(env) + 2) > 512) return NULL;
data/trnascan-se-2.0.7+ds/src/sre_string.c:51:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if ((new = (char *) malloc (strlen(s) +1)) == NULL) return NULL;
data/trnascan-se-2.0.7+ds/src/sre_string.c:185:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(*buf, s+pmatch[0].rm_so, len);
data/trnascan-se-2.0.7+ds/src/sre_string.c:198:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(*sp, s+pmatch[i].rm_so, len);
data/trnascan-se-2.0.7+ds/src/sre_string.c:228:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for (len = strlen(s1); len > 1; len--)
data/trnascan-se-2.0.7+ds/src/trace.c:306: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(seq);
data/trnascan-se-2.0.7+ds/src/trnascan.c:1003:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(anticodon,ptr4+7,3);
data/trnascan-se-2.0.7+ds/src/trnascan.c:1006:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(chaine2,(ptr1-7),lpair1+2);
data/trnascan-se-2.0.7+ds/src/trnascan.c:1112:15:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
              strncpy(anticodon,ptr4+7,3);
data/trnascan-se-2.0.7+ds/src/trnascan.c:1115:15:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
              strncpy(chaine2,(ptr1-7),lpair1+2);
data/trnascan-se-2.0.7+ds/src/trnascan.c:1229:19:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while ((c = getc(fpi)) == ';')
data/trnascan-se-2.0.7+ds/src/trnascan.c:1234:18:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while ((c= getc(fpi)) != ';' && c != EOF)
data/trnascan-se-2.0.7+ds/src/trnascan.c:1249:19:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while ((c = getc(fpi)) == ';')
data/trnascan-se-2.0.7+ds/src/trnascan.c:1259:18:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while ((c= getc(fpi)) != ';' && c != EOF)
data/trnascan-se-2.0.7+ds/src/trnascan.c:1282:16:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((c= getc(fpi)) != '>' && c != EOF)
data/trnascan-se-2.0.7+ds/src/trnascan.c:1354:19:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while ((c = getc(fpi)) == ';')
data/trnascan-se-2.0.7+ds/src/trnascan.c:1358:18:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while ((c= getc(fpi)) != ';' && c != EOF)
data/trnascan-se-2.0.7+ds/src/trnascan.c:1368:19:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while ((c = getc(fpi)) == ';')
data/trnascan-se-2.0.7+ds/src/trnascan.c:1373:18:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while ((c= getc(fpi)) != ';' && c != EOF)
data/trnascan-se-2.0.7+ds/src/trnascan.c:1383:16:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((c= getc(fpi)) != '>' && c != EOF)
data/trnascan-se-2.0.7+ds/src/trnascan.c:1848:1:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
strncpy(type_trna,amino_acid[num-1],3);
data/trnascan-se-2.0.7+ds/src/types.c:42:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if ((strncmp(s, "0x", 2) == 0 && (int) strlen(s) > 2) ||
data/trnascan-se-2.0.7+ds/src/types.c:43:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      (strncmp(s, "0X", 2) == 0 && (int) strlen(s) > 2))
data/trnascan-se-2.0.7+ds/src/types.c:48:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  else if (*s == '0' && (int) strlen(s) > 1)
data/trnascan-se-2.0.7+ds/src/viterbi.c:81: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).
  N = strlen(seq);

ANALYSIS SUMMARY:

Hits = 280
Lines analyzed = 28692 in approximately 0.89 seconds (32278 lines/second)
Physical Source Lines of Code (SLOC) = 17475
Hits@level = [0] 496 [1]  93 [2] 143 [3]  14 [4]  30 [5]   0
Hits@level+ = [0+] 776 [1+] 280 [2+] 187 [3+]  44 [4+]  30 [5+]   0
Hits/KSLOC@level+ = [0+] 44.4063 [1+] 16.0229 [2+] 10.701 [3+] 2.51788 [4+] 1.71674 [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.