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/sortmerna-2.1/alp/gumbel_params.cpp
Examining data/sortmerna-2.1/alp/gumbel_params.hpp
Examining data/sortmerna-2.1/alp/gumbelparams_app.t.cpp
Examining data/sortmerna-2.1/alp/njn_approx.hpp
Examining data/sortmerna-2.1/alp/njn_doubletype.hpp
Examining data/sortmerna-2.1/alp/njn_dynprogprob.cpp
Examining data/sortmerna-2.1/alp/njn_dynprogprob.hpp
Examining data/sortmerna-2.1/alp/njn_dynprogproblim.cpp
Examining data/sortmerna-2.1/alp/njn_dynprogproblim.hpp
Examining data/sortmerna-2.1/alp/njn_dynprogprobproto.cpp
Examining data/sortmerna-2.1/alp/njn_dynprogprobproto.hpp
Examining data/sortmerna-2.1/alp/njn_function.hpp
Examining data/sortmerna-2.1/alp/njn_integer.hpp
Examining data/sortmerna-2.1/alp/njn_ioutil.cpp
Examining data/sortmerna-2.1/alp/njn_ioutil.hpp
Examining data/sortmerna-2.1/alp/njn_localmaxstat.cpp
Examining data/sortmerna-2.1/alp/njn_localmaxstat.hpp
Examining data/sortmerna-2.1/alp/njn_localmaxstatmatrix.cpp
Examining data/sortmerna-2.1/alp/njn_localmaxstatmatrix.hpp
Examining data/sortmerna-2.1/alp/njn_localmaxstatutil.cpp
Examining data/sortmerna-2.1/alp/njn_localmaxstatutil.hpp
Examining data/sortmerna-2.1/alp/njn_matrix.cpp
Examining data/sortmerna-2.1/alp/njn_matrix.hpp
Examining data/sortmerna-2.1/alp/njn_memutil.hpp
Examining data/sortmerna-2.1/alp/njn_random.cpp
Examining data/sortmerna-2.1/alp/njn_random.hpp
Examining data/sortmerna-2.1/alp/njn_root.hpp
Examining data/sortmerna-2.1/alp/njn_stringutil.cpp
Examining data/sortmerna-2.1/alp/njn_stringutil.hpp
Examining data/sortmerna-2.1/alp/njn_uniform.hpp
Examining data/sortmerna-2.1/alp/njn_vector.hpp
Examining data/sortmerna-2.1/alp/sls_alp.cpp
Examining data/sortmerna-2.1/alp/sls_alp.hpp
Examining data/sortmerna-2.1/alp/sls_alp_data.cpp
Examining data/sortmerna-2.1/alp/sls_alp_data.hpp
Examining data/sortmerna-2.1/alp/sls_alp_regression.cpp
Examining data/sortmerna-2.1/alp/sls_alp_regression.hpp
Examining data/sortmerna-2.1/alp/sls_alp_sim.cpp
Examining data/sortmerna-2.1/alp/sls_alp_sim.hpp
Examining data/sortmerna-2.1/alp/sls_normal_distr_array.hpp
Examining data/sortmerna-2.1/alp/sls_pvalues.cpp
Examining data/sortmerna-2.1/alp/sls_pvalues.hpp
Examining data/sortmerna-2.1/cmph/bdz.c
Examining data/sortmerna-2.1/cmph/bdz.h
Examining data/sortmerna-2.1/cmph/bdz_ph.c
Examining data/sortmerna-2.1/cmph/bdz_ph.h
Examining data/sortmerna-2.1/cmph/bdz_structs.h
Examining data/sortmerna-2.1/cmph/bdz_structs_ph.h
Examining data/sortmerna-2.1/cmph/bitbool.h
Examining data/sortmerna-2.1/cmph/bmz.c
Examining data/sortmerna-2.1/cmph/bmz.h
Examining data/sortmerna-2.1/cmph/bmz8.c
Examining data/sortmerna-2.1/cmph/bmz8.h
Examining data/sortmerna-2.1/cmph/bmz8_structs.h
Examining data/sortmerna-2.1/cmph/bmz_structs.h
Examining data/sortmerna-2.1/cmph/brz.c
Examining data/sortmerna-2.1/cmph/brz.h
Examining data/sortmerna-2.1/cmph/brz_structs.h
Examining data/sortmerna-2.1/cmph/buffer_entry.c
Examining data/sortmerna-2.1/cmph/buffer_entry.h
Examining data/sortmerna-2.1/cmph/buffer_manager.c
Examining data/sortmerna-2.1/cmph/buffer_manager.h
Examining data/sortmerna-2.1/cmph/chd.c
Examining data/sortmerna-2.1/cmph/chd.h
Examining data/sortmerna-2.1/cmph/chd_ph.c
Examining data/sortmerna-2.1/cmph/chd_ph.h
Examining data/sortmerna-2.1/cmph/chd_structs.h
Examining data/sortmerna-2.1/cmph/chd_structs_ph.h
Examining data/sortmerna-2.1/cmph/chm.c
Examining data/sortmerna-2.1/cmph/chm.h
Examining data/sortmerna-2.1/cmph/chm_structs.h
Examining data/sortmerna-2.1/cmph/cmph.c
Examining data/sortmerna-2.1/cmph/cmph.h
Examining data/sortmerna-2.1/cmph/cmph_structs.c
Examining data/sortmerna-2.1/cmph/cmph_structs.h
Examining data/sortmerna-2.1/cmph/cmph_time.h
Examining data/sortmerna-2.1/cmph/cmph_types.h
Examining data/sortmerna-2.1/cmph/compressed_rank.c
Examining data/sortmerna-2.1/cmph/compressed_rank.h
Examining data/sortmerna-2.1/cmph/compressed_seq.c
Examining data/sortmerna-2.1/cmph/compressed_seq.h
Examining data/sortmerna-2.1/cmph/debug.h
Examining data/sortmerna-2.1/cmph/fch.c
Examining data/sortmerna-2.1/cmph/fch.h
Examining data/sortmerna-2.1/cmph/fch_buckets.c
Examining data/sortmerna-2.1/cmph/fch_buckets.h
Examining data/sortmerna-2.1/cmph/fch_structs.h
Examining data/sortmerna-2.1/cmph/graph.c
Examining data/sortmerna-2.1/cmph/graph.h
Examining data/sortmerna-2.1/cmph/hash.c
Examining data/sortmerna-2.1/cmph/hash.h
Examining data/sortmerna-2.1/cmph/hash_state.h
Examining data/sortmerna-2.1/cmph/jenkins_hash.c
Examining data/sortmerna-2.1/cmph/jenkins_hash.h
Examining data/sortmerna-2.1/cmph/miller_rabin.c
Examining data/sortmerna-2.1/cmph/miller_rabin.h
Examining data/sortmerna-2.1/cmph/select.c
Examining data/sortmerna-2.1/cmph/select.h
Examining data/sortmerna-2.1/cmph/select_lookup_tables.h
Examining data/sortmerna-2.1/cmph/vqueue.c
Examining data/sortmerna-2.1/cmph/vqueue.h
Examining data/sortmerna-2.1/cmph/vstack.c
Examining data/sortmerna-2.1/cmph/vstack.h
Examining data/sortmerna-2.1/include/bitvector.hpp
Examining data/sortmerna-2.1/include/common.hpp
Examining data/sortmerna-2.1/include/config.h
Examining data/sortmerna-2.1/include/indexdb.hpp
Examining data/sortmerna-2.1/include/loadgenome.hpp
Examining data/sortmerna-2.1/include/memcheck.h
Examining data/sortmerna-2.1/include/minoccur.hpp
Examining data/sortmerna-2.1/include/outputformats.hpp
Examining data/sortmerna-2.1/include/paralleltraversal.hpp
Examining data/sortmerna-2.1/include/ssw.h
Examining data/sortmerna-2.1/include/triestats.hpp
Examining data/sortmerna-2.1/src/bitvector.cpp
Examining data/sortmerna-2.1/src/indexdb.cpp
Examining data/sortmerna-2.1/src/main.cpp
Examining data/sortmerna-2.1/src/minoccur.cpp
Examining data/sortmerna-2.1/src/outputformats.cpp
Examining data/sortmerna-2.1/src/paralleltraversal.cpp
Examining data/sortmerna-2.1/src/ssw.c
Examining data/sortmerna-2.1/src/ssw_example.c

FINAL RESULTS:

data/sortmerna-2.1/alp/gumbelparams_app.t.cpp:831:4:  [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.
			system(tmp.data());
data/sortmerna-2.1/alp/njn_stringutil.cpp:147: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 (str, symbols_.c_str ());
data/sortmerna-2.1/alp/njn_stringutil.cpp:166: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 (str, symbols_.c_str ());
data/sortmerna-2.1/alp/njn_stringutil.cpp:192: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 (str, symbols_.c_str ());
data/sortmerna-2.1/alp/njn_stringutil.cpp:235: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 (str, symbols_.c_str ());
data/sortmerna-2.1/alp/njn_stringutil.cpp:253: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 (str, symbols_.c_str ());
data/sortmerna-2.1/alp/njn_stringutil.cpp:292: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 (str, symbols_.c_str ());
data/sortmerna-2.1/alp/njn_stringutil.cpp:314: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 (str, symbols_.c_str ());
data/sortmerna-2.1/alp/njn_stringutil.cpp:365: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 (symbols_, str.c_str ());
data/sortmerna-2.1/alp/njn_stringutil.cpp:372: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 (str, symbols_.c_str ());
data/sortmerna-2.1/cmph/brz.c:88:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf((char *)(brz->tmp_dir), "%s/", (char *)tmp_dir);
data/sortmerna-2.1/cmph/brz.c:93:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf((char *)(brz->tmp_dir), "%s", (char *)tmp_dir);
data/sortmerna-2.1/cmph/brz.c:282:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(filename, "%s%u.cmph",brz->tmp_dir, nflushes);
data/sortmerna-2.1/cmph/brz.c:342:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(filename, "%s%u.cmph",brz->tmp_dir, nflushes);
data/sortmerna-2.1/cmph/brz.c:384:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(filename, "%s%u.cmph",brz->tmp_dir, i);
data/sortmerna-2.1/cmph/cmph.c:116: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(*key, keys_vd[cmph_vector->position]);
data/sortmerna-2.1/cmph/debug.h:32:5:  [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, f, ap);
data/sortmerna-2.1/cmph/debug.h:45:77:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define DEBUGP(args...) do { fprintf(stderr, "%s:%d ", __FILE__, __LINE__); fprintf(stderr, ## args); } while(0)
data/sortmerna-2.1/include/common.hpp:58:48:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define eprintf(format, ...) do { if (verbose) fprintf(stdout, format, ##__VA_ARGS__);} while(0)
data/sortmerna-2.1/src/indexdb.cpp:1015:19:  [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 (str, indexfile);
data/sortmerna-2.1/src/indexdb.cpp:1016:19:  [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 (str, bases[file]);
data/sortmerna-2.1/src/indexdb.cpp:1336: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(tmp_str,ptr_tmpdir);
data/sortmerna-2.1/src/indexdb.cpp:1343: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(tmp_str_test, tmp_str);
data/sortmerna-2.1/src/indexdb.cpp:1345: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(tmp_str_test, pidStr);
data/sortmerna-2.1/src/indexdb.cpp:1376: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(tmp_str,tmpdir_env);
data/sortmerna-2.1/src/indexdb.cpp:1382: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(tmp_str_test,tmp_str);
data/sortmerna-2.1/src/indexdb.cpp:1384: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(tmp_str_test,pidStr);
data/sortmerna-2.1/src/indexdb.cpp:1412: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(tmp_str, pidStr);
data/sortmerna-2.1/src/indexdb.cpp:1440: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(tmp_str, pidStr);
data/sortmerna-2.1/src/indexdb.cpp:1468:3:  [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(keys_str,pidStr);
data/sortmerna-2.1/src/paralleltraversal.cpp:1428: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( suffix, suff+1 );
data/sortmerna-2.1/src/paralleltraversal.cpp:1462: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 ( acceptedstrings, ptr_filetype_ar );
data/sortmerna-2.1/src/paralleltraversal.cpp:1466: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).
        strcat ( acceptedstrings, pidStr);
data/sortmerna-2.1/src/paralleltraversal.cpp:1469: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 ( acceptedstrings, suffix);
data/sortmerna-2.1/src/paralleltraversal.cpp:1483: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( acceptedstrings_sam, ptr_filetype_ar );
data/sortmerna-2.1/src/paralleltraversal.cpp:1487: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).
        strcat( acceptedstrings_sam, pidStr);
data/sortmerna-2.1/src/paralleltraversal.cpp:1502: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( acceptedstrings_blast, ptr_filetype_ar );
data/sortmerna-2.1/src/paralleltraversal.cpp:1506: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).
        strcat( acceptedstrings_blast, pidStr);
data/sortmerna-2.1/src/paralleltraversal.cpp:1522: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( logoutfile, ptr_filetype_ar );
data/sortmerna-2.1/src/paralleltraversal.cpp:1526: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).
        strcat( logoutfile, pidStr);
data/sortmerna-2.1/src/paralleltraversal.cpp:1543: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( acceptedotumap_file, ptr_filetype_ar );
data/sortmerna-2.1/src/paralleltraversal.cpp:1547: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).
        strcat( acceptedotumap_file, pidStr);
data/sortmerna-2.1/src/paralleltraversal.cpp:1562: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( denovo_otus_file, ptr_filetype_ar );
data/sortmerna-2.1/src/paralleltraversal.cpp:1566: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).
        strcat( denovo_otus_file, pidStr);
data/sortmerna-2.1/src/paralleltraversal.cpp:1569: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 ( denovo_otus_file, suffix);
data/sortmerna-2.1/src/paralleltraversal.cpp:1587: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).
        strcat( ptr_filetype_or, pidStr);
data/sortmerna-2.1/src/paralleltraversal.cpp:1590: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 ( ptr_filetype_or, suffix );
data/sortmerna-2.1/alp/njn_ioutil.cpp:162:30:  [3] (random) setstate:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        if (str.fail ()) in_.setstate (ios_base::failbit);
data/sortmerna-2.1/alp/sls_alp_data.cpp:371:3:  [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(d_random_factor);
data/sortmerna-2.1/src/indexdb.cpp:1372:18:  [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.
    tmpdir_env = getenv("TMPDIR");
data/sortmerna-2.1/alp/njn_localmaxstat.cpp:111: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 (d_score_p, score_, sizeof (long int) * getDimension ());
data/sortmerna-2.1/alp/njn_localmaxstat.cpp:112: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 (d_prob_p, prob_, sizeof (double) * getDimension ());
data/sortmerna-2.1/alp/njn_localmaxstat.cpp:151: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 (d_score_p, score_, sizeof (long int) * getDimension ());
data/sortmerna-2.1/alp/njn_localmaxstat.cpp:152: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 (d_prob_p, prob_, sizeof (double) * getDimension ());
data/sortmerna-2.1/alp/njn_localmaxstatmatrix.cpp:99:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy (d_scoreMatrix_p [i], scoreMatrix_ [i], sizeof (long int) * getDimMatrix2 ());
data/sortmerna-2.1/alp/njn_localmaxstatmatrix.cpp:102: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 (d_p_p, p_, sizeof (double) * getDimMatrix ());
data/sortmerna-2.1/alp/njn_localmaxstatmatrix.cpp:103: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 (d_p2_p, p2_, sizeof (double) * getDimMatrix2 ());
data/sortmerna-2.1/alp/njn_localmaxstatmatrix.cpp:148:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy (d_scoreMatrix_p [i], scoreMatrix_ [i], sizeof (long int) * getDimMatrix2 ());
data/sortmerna-2.1/alp/njn_localmaxstatmatrix.cpp:151: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 (d_p_p, p_, sizeof (double) * getDimMatrix ());
data/sortmerna-2.1/alp/njn_localmaxstatmatrix.cpp:152: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 (d_p2_p, p2_, sizeof (double) * getDimMatrix2 ());
data/sortmerna-2.1/alp/njn_memutil.hpp:80:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	        if (size != 0) memcpy (to, from, size);
data/sortmerna-2.1/alp/sls_alp_data.cpp:240:10:  [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).
			frand.open(rand_st.data(),ios::in);
data/sortmerna-2.1/alp/sls_alp_data.cpp:535:5:  [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).
		f.open(out_file_name_.data(),ios::in);
data/sortmerna-2.1/alp/sls_alp_data.cpp:690:5:  [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).
		f.open(smatr_file_name_.data(),ios::in);
data/sortmerna-2.1/alp/sls_alp_data.cpp:780:5:  [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).
		f.open(RR_file_name_.data(),ios::in);
data/sortmerna-2.1/alp/sls_alp_data.hpp:308: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 d_for_D_states[3];
data/sortmerna-2.1/alp/sls_alp_data.hpp:309: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 d_for_I_states[2];
data/sortmerna-2.1/alp/sls_alp_data.hpp:310: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 d_for_S_states[3];
data/sortmerna-2.1/alp/sls_alp_sim.cpp:745:10:  [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).
			frand.open(rand_st.data(),ios::out);
data/sortmerna-2.1/cmph/bdz.c:660: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(ptr, data->ranktable, sizeof(cmph_uint32)*(data->ranktablesize));
data/sortmerna-2.1/cmph/bdz.c:668: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(ptr, data->g,  sizeof(cmph_uint8)*sizeg);
data/sortmerna-2.1/cmph/bdz_ph.c:578: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(ptr, data->g,  sizeof(cmph_uint8)*sizeg);
data/sortmerna-2.1/cmph/bmz.c:594: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(ptr, data->g, sizeof(cmph_uint32)*data->n);
data/sortmerna-2.1/cmph/bmz8.c:600: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(ptr, data->g, sizeof(cmph_uint8)*data->n);
data/sortmerna-2.1/cmph/brz.c:46:2:  [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((char *)(brz->tmp_dir), "/var/tmp/");
data/sortmerna-2.1/cmph/brz.c:283: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).
			tmp_fd = fopen(filename, "wb");
data/sortmerna-2.1/cmph/brz.c:298: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(buffer + memory_usage, &keylen, sizeof(keylen));
data/sortmerna-2.1/cmph/brz.c:299: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(buffer + memory_usage + sizeof(keylen), key, (size_t)keylen);
data/sortmerna-2.1/cmph/brz.c:343: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).
		tmp_fd = fopen(filename, "wb");
data/sortmerna-2.1/cmph/brz.c:535: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(buf, &buflenh1, sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/brz.c:536: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(buf+sizeof(cmph_uint32), bufh1, (size_t)buflenh1);
data/sortmerna-2.1/cmph/brz.c:537: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(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/brz.c:538: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(buf+2*sizeof(cmph_uint32)+buflenh1, bufh2, (size_t)buflenh2);
data/sortmerna-2.1/cmph/brz.c:539:26:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	for (i = 0; i < n; i++) memcpy(buf+2*sizeof(cmph_uint32)+buflenh1+buflenh2+i,(fchf->g + i), (size_t)1);
data/sortmerna-2.1/cmph/brz.c:556: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(buf, &buflenh1, sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/brz.c:557: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(buf+sizeof(cmph_uint32), bufh1, (size_t)buflenh1);
data/sortmerna-2.1/cmph/brz.c:558: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(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/brz.c:559: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(buf+2*sizeof(cmph_uint32)+buflenh1, bufh2, (size_t)buflenh2);
data/sortmerna-2.1/cmph/brz.c:560: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(buf+2*sizeof(cmph_uint32)+buflenh1+buflenh2,bmzf->g, (size_t)n);
data/sortmerna-2.1/cmph/brz.c:753: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(ptr, &(data->algo), sizeof(data->algo));
data/sortmerna-2.1/cmph/brz.c:758: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(ptr, &h0_type, sizeof(h0_type));
data/sortmerna-2.1/cmph/brz.c:766: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(ptr, &(data->k), sizeof(data->k));
data/sortmerna-2.1/cmph/brz.c:775: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(ptr, &h1_type, sizeof(h1_type));
data/sortmerna-2.1/cmph/brz.c:780: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(ptr, &h2_type, sizeof(h2_type));
data/sortmerna-2.1/cmph/brz.c:784: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(ptr, data->size, sizeof(cmph_uint8)*data->k);
data/sortmerna-2.1/cmph/brz.c:788: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(ptr, data->offset, sizeof(cmph_uint32)*data->k);
data/sortmerna-2.1/cmph/brz.c:825:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(g_i, data->g[i], sizeof(cmph_uint8)*n);
data/sortmerna-2.1/cmph/buffer_entry.c:32: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).
	buffer_entry->fd = fopen(filename, "rb");
data/sortmerna-2.1/cmph/buffer_entry.c:69:26:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		if (copied_bytes != 0) memcpy(keylen, buffer_entry->buff + buffer_entry->pos, (size_t)copied_bytes);
data/sortmerna-2.1/cmph/buffer_entry.c:72: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(keylen + copied_bytes, buffer_entry->buff + buffer_entry->pos, (size_t)lacked_bytes);
data/sortmerna-2.1/cmph/buffer_entry.c:78:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buf, keylen, sizeof(*keylen));
data/sortmerna-2.1/cmph/buffer_entry.c:83: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(buf + sizeof(*keylen), buffer_entry->buff + buffer_entry->pos, (size_t)copied_bytes);
data/sortmerna-2.1/cmph/buffer_entry.c:87: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(buf+sizeof(*keylen)+copied_bytes, buffer_entry->buff + buffer_entry->pos, (size_t)lacked_bytes);
data/sortmerna-2.1/cmph/chd.c:256: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(ptr8, data->packed_cr, data->packed_cr_size);
data/sortmerna-2.1/cmph/chd.c:263: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(ptr8, data->packed_chd_phf, data->packed_chd_phf_size);
data/sortmerna-2.1/cmph/chm.c:347: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(ptr, data->g, sizeof(cmph_uint32)*data->n);
data/sortmerna-2.1/cmph/cmph.c:63: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 buf[BUFSIZ];
data/sortmerna-2.1/cmph/cmph.c:68: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(*key + *keylen, buf, strlen(buf));
data/sortmerna-2.1/cmph/cmph.c:86: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(keylen, keys_vd[cmph_vector->position], sizeof(*keylen));
data/sortmerna-2.1/cmph/cmph.c:89: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(*key, keys_vd[cmph_vector->position] + sizeof(*keylen), size);
data/sortmerna-2.1/cmph/cmph.c:103: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(*key, (keys_vd + (cmph_struct_vector->position * cmph_struct_vector->struct_size) + cmph_struct_vector->key_offset), size);
data/sortmerna-2.1/cmph/cmph.c:158: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 buf[BUFSIZ];
data/sortmerna-2.1/cmph/cmph_structs.c: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 algo_name[BUFSIZ];
data/sortmerna-2.1/cmph/compressed_rank.c:146: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(*buf, &(cr->max_val), sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/compressed_rank.c:150: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(*buf + pos, &(cr->n), sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/compressed_rank.c:154: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(*buf + pos, &(cr->rem_r), sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/compressed_rank.c:160: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(*buf + pos, &buflen_sel, sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/compressed_rank.c:164: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(*buf + pos, buf_sel, buflen_sel);
data/sortmerna-2.1/cmph/compressed_rank.c:178: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(*buf + pos, cr->vals_rems, vals_rems_size);
data/sortmerna-2.1/cmph/compressed_rank.c:197: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(&(cr->max_val), buf, sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/compressed_rank.c:201: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(&(cr->n), buf + pos, sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/compressed_rank.c:205: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(&(cr->rem_r), buf + pos, sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/compressed_rank.c:210: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(&buflen_sel, buf + pos, sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/compressed_rank.c:232: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(cr->vals_rems, buf + pos, vals_rems_size);
data/sortmerna-2.1/cmph/compressed_rank.c:254: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(cr_packed, buf, buflen);
data/sortmerna-2.1/cmph/compressed_seq.c:185: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(*buf, &(cs->n), sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/compressed_seq.c:189: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(*buf + pos, &(cs->rem_r), sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/compressed_seq.c:193: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(*buf + pos, &(cs->total_length), sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/compressed_seq.c:200: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(*buf + pos, &buflen_sel, sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/compressed_seq.c:204: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(*buf + pos, buf_sel, buflen_sel);
data/sortmerna-2.1/cmph/compressed_seq.c:217: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(*buf + pos, cs->length_rems, length_rems_size);
data/sortmerna-2.1/cmph/compressed_seq.c:227: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(*buf + pos, cs->store_table, store_table_size);
data/sortmerna-2.1/cmph/compressed_seq.c:246: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(&(cs->n), buf, sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/compressed_seq.c:250: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(&(cs->rem_r), buf + pos, sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/compressed_seq.c:254: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(&(cs->total_length), buf + pos, sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/compressed_seq.c:259: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(&buflen_sel, buf + pos, sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/compressed_seq.c:281: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(cs->length_rems, buf + pos, length_rems_size);
data/sortmerna-2.1/cmph/compressed_seq.c:299: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(cs->store_table, buf + pos, store_table_size);
data/sortmerna-2.1/cmph/compressed_seq.c:318: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(cs_packed, buf, buflen);
data/sortmerna-2.1/cmph/debug.h:30: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(f, p, plen);
data/sortmerna-2.1/cmph/debug.h:31: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(f + plen, format, strlen(format) + 1);
data/sortmerna-2.1/cmph/fch.c:475: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(ptr, data->g, sizeof(cmph_uint32)*(data->b));
data/sortmerna-2.1/cmph/hash.c:69: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.
	*buf = (char *)malloc(strlen(cmph_hash_names[state->hashfunc]) + 1 + *buflen);
data/sortmerna-2.1/cmph/hash.c:70: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(*buf, cmph_hash_names[state->hashfunc], strlen(cmph_hash_names[state->hashfunc]) + 1);
data/sortmerna-2.1/cmph/hash.c:73: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(*buf + strlen(cmph_hash_names[state->hashfunc]) + 1, algobuf, len);
data/sortmerna-2.1/cmph/jenkins_hash.c:230: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(*buf, &(state->seed), sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/jenkins_hash.c:262: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(jenkins_packed, &(state->seed), sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/select.c:239: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(*buf, &(sel->n), sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/select.c:241: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(*buf + pos, &(sel->m), sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/select.c:243: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(*buf + pos, sel->bits_vec, vec_size);
data/sortmerna-2.1/cmph/select.c:245: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(*buf + pos, sel->select_table, sel_table_size);
data/sortmerna-2.1/cmph/select.c:257: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(&(sel->n), buf, sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/select.c:259: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(&(sel->m), buf + pos, sizeof(cmph_uint32));
data/sortmerna-2.1/cmph/select.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(sel->bits_vec, buf + pos, vec_size);
data/sortmerna-2.1/cmph/select.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(sel->select_table, buf + pos, sel_table_size);
data/sortmerna-2.1/cmph/select.c:298: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(sel_packed, buf, buflen);
data/sortmerna-2.1/include/loadgenome.hpp:65: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.
extern char map_nt[122];
data/sortmerna-2.1/include/minoccur.hpp:65: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.
extern char map_nt[122];
data/sortmerna-2.1/include/ssw.h:26:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char map_nt[122];
data/sortmerna-2.1/src/indexdb.cpp:55:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char map_nt[122] = {
data/sortmerna-2.1/src/indexdb.cpp:183: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((void*)node_elem->whichnode.bucket, (void*)src, node_elem_size);
data/sortmerna-2.1/src/indexdb.cpp:262:11:  [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(node_elem_child->whichnode.bucket, src, child_bucket_size);
data/sortmerna-2.1/src/indexdb.cpp:270:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy( (unsigned char*)node_elem_child->whichnode.bucket + node_elem_child->size, start_bucket_to_burst, ENTRYSIZE);
data/sortmerna-2.1/src/indexdb.cpp:328: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(positions_tbl->arr, src, size*sizeof(seq_pos));
data/sortmerna-2.1/src/indexdb.cpp:618: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 get_char[4] = {'A','C','G','T'};
data/sortmerna-2.1/src/indexdb.cpp:980: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.
              char fastafile[2000];
data/sortmerna-2.1/src/indexdb.cpp:992: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 ( FILE *file = fopen(fastafile, "r") )
data/sortmerna-2.1/src/indexdb.cpp:1001:17:  [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 indexfile[2000];
data/sortmerna-2.1/src/indexdb.cpp:1009:17:  [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 bases[4][50] = {".bursttrie_0.dat", ".pos_0.dat", ".kmer_0.dat", ".stats"};
data/sortmerna-2.1/src/indexdb.cpp:1014:19:  [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[2000];
data/sortmerna-2.1/src/indexdb.cpp:1017:29:  [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 *t = fopen(str, "w");
data/sortmerna-2.1/src/indexdb.cpp:1037: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.
              char indexfile[2000];
data/sortmerna-2.1/src/indexdb.cpp:1048: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.
              char dir[500];
data/sortmerna-2.1/src/indexdb.cpp:1052:17:  [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( dir, indexfile, (ptr_end-indexfile) );
data/sortmerna-2.1/src/indexdb.cpp:1057:17:  [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( dir, "./" );
data/sortmerna-2.1/src/indexdb.cpp:1139:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
              interval = atoi(argv[narg+1]);
data/sortmerna-2.1/src/indexdb.cpp:1181:25:  [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).
              max_pos = atoi(argv[narg+1]);
data/sortmerna-2.1/src/indexdb.cpp:1219: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).
	int lnwin_t = atoi(argv[narg+1]);
data/sortmerna-2.1/src/indexdb.cpp:1327: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 pidStr[4000];
data/sortmerna-2.1/src/indexdb.cpp:1328: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(pidStr,"%d",pid);
data/sortmerna-2.1/src/indexdb.cpp:1329: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 keys_str[4000] = "";
data/sortmerna-2.1/src/indexdb.cpp:1335: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 tmp_str[4000] = "";
data/sortmerna-2.1/src/indexdb.cpp:1342: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 tmp_str_test[4100] = "";
data/sortmerna-2.1/src/indexdb.cpp:1344: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(tmp_str_test, "test_");
data/sortmerna-2.1/src/indexdb.cpp:1346: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(tmp_str_test, ".txt");
data/sortmerna-2.1/src/indexdb.cpp:1348:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *tmp = fopen(tmp_str_test, "w+");
data/sortmerna-2.1/src/indexdb.cpp:1363: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(keys_str, tmp_str, 4000);
data/sortmerna-2.1/src/indexdb.cpp:1375:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char tmp_str[4000] = "";
data/sortmerna-2.1/src/indexdb.cpp:1381:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char tmp_str_test[4100] = "";
data/sortmerna-2.1/src/indexdb.cpp:1383:7:  [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(tmp_str_test,"test_");
data/sortmerna-2.1/src/indexdb.cpp:1385:7:  [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(tmp_str_test,".txt");
data/sortmerna-2.1/src/indexdb.cpp:1387: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).
      FILE *tmp = fopen(tmp_str_test, "w+");
data/sortmerna-2.1/src/indexdb.cpp:1402: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(keys_str, tmp_str, 4000);
data/sortmerna-2.1/src/indexdb.cpp:1410:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char tmp_str[4000] = "";
data/sortmerna-2.1/src/indexdb.cpp:1411:7:  [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(tmp_str, "/tmp/test_");
data/sortmerna-2.1/src/indexdb.cpp:1413:7:  [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(tmp_str, ".txt");
data/sortmerna-2.1/src/indexdb.cpp:1415: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).
      FILE *tmp = fopen(tmp_str, "w+");
data/sortmerna-2.1/src/indexdb.cpp:1430:9:  [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(keys_str,"/tmp/");
data/sortmerna-2.1/src/indexdb.cpp:1438:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char tmp_str[4000] = "";
data/sortmerna-2.1/src/indexdb.cpp:1439:7:  [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(tmp_str, "./test_");
data/sortmerna-2.1/src/indexdb.cpp:1441:7:  [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(tmp_str, ".txt");
data/sortmerna-2.1/src/indexdb.cpp:1443: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).
      FILE *tmp = fopen(tmp_str, "w+");
data/sortmerna-2.1/src/indexdb.cpp:1461:9:  [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(keys_str, "./");
data/sortmerna-2.1/src/indexdb.cpp:1467:3:  [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(keys_str, "sortmerna_keys_");
data/sortmerna-2.1/src/indexdb.cpp:1469:3:  [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(keys_str,".txt");
data/sortmerna-2.1/src/indexdb.cpp:1493: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 *fp = fopen((char*)(myfiles[newindex].first).c_str(),"r");
data/sortmerna-2.1/src/indexdb.cpp:1536:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char read_header[2000];
data/sortmerna-2.1/src/indexdb.cpp:1635: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).
    FILE *keys = fopen(keys_str, "w+");
data/sortmerna-2.1/src/indexdb.cpp:2059: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.
         char a[38] = {0};
data/sortmerna-2.1/src/indexdb.cpp:2060:10:  [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(a,"%llu",(kmer_key>>2));
data/sortmerna-2.1/src/indexdb.cpp:2112:6:  [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 get_char[4] = {'A','C','G','T'};
data/sortmerna-2.1/src/indexdb.cpp:2117: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.
       char kmer_out[9] = "";
data/sortmerna-2.1/src/main.cpp:294:31:  [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 *file = fopen(argv[narg+1], "r") )
data/sortmerna-2.1/src/main.cpp:335: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.
              char fastafile[2000];
data/sortmerna-2.1/src/main.cpp:353: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 ( FILE *file = fopen(fastafile, "r") )
data/sortmerna-2.1/src/main.cpp:371: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.
              char indexfile[2000];
data/sortmerna-2.1/src/main.cpp:379: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.
              char dir[500];
data/sortmerna-2.1/src/main.cpp:383:17:  [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( dir, indexfile, (ptr_end-indexfile) );
data/sortmerna-2.1/src/main.cpp:388:17:  [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( dir, "./" );
data/sortmerna-2.1/src/main.cpp:445:13:  [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 dir[500];
data/sortmerna-2.1/src/main.cpp:449:15:  [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( dir, argv[narg+1], (ptr-argv[narg+1]) );
data/sortmerna-2.1/src/main.cpp:454:17:  [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( dir, "./" );
data/sortmerna-2.1/src/main.cpp:484:13:  [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 dir[500];
data/sortmerna-2.1/src/main.cpp:488:15:  [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( dir, argv[narg+1], (ptr-argv[narg+1]) );
data/sortmerna-2.1/src/main.cpp:493:17:  [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( dir, "./" );
data/sortmerna-2.1/src/main.cpp:642: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).
            match = atoi(argv[narg+1]);
data/sortmerna-2.1/src/main.cpp:665: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).
            mismatch = atoi(argv[narg+1]);
data/sortmerna-2.1/src/main.cpp:694: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).
            gap_open = atoi(argv[narg+1]);
data/sortmerna-2.1/src/main.cpp:723:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            gap_extension = atoi(argv[narg+1]);
data/sortmerna-2.1/src/main.cpp:952:33:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            num_alignments_gv = atoi(argv[narg+1]);
data/sortmerna-2.1/src/main.cpp:1231: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).
          score_N = atoi(argv[narg+1]);
data/sortmerna-2.1/src/minoccur.cpp:83:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fd = open(fname.c_str(), O_RDONLY)) == -1) 
data/sortmerna-2.1/src/minoccur.cpp:235:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
						char amb[3] = { 1, 2, 3 };
data/sortmerna-2.1/src/minoccur.cpp:243:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
						char amb[3] = { 0, 2, 3 };
data/sortmerna-2.1/src/minoccur.cpp:251:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
						char amb[3] = { 0, 1, 3 };
data/sortmerna-2.1/src/minoccur.cpp:259:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
						char amb[2] = { 2, 3 };
data/sortmerna-2.1/src/minoccur.cpp:267:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
						char amb[2] = { 0, 1 };
data/sortmerna-2.1/src/minoccur.cpp:275:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
						char amb[4] = { 0, 1, 2, 3 };
data/sortmerna-2.1/src/minoccur.cpp:283:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
						char amb[2] = { 0, 2 };
data/sortmerna-2.1/src/minoccur.cpp:291:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
						char amb[2] = { 1, 2 };
data/sortmerna-2.1/src/minoccur.cpp:299:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
						char amb[3] = { 0, 1, 2 };
data/sortmerna-2.1/src/minoccur.cpp:307:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
						char amb[2] = { 0, 3 };
data/sortmerna-2.1/src/minoccur.cpp:315:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
						char amb[2] = { 1, 3 };
data/sortmerna-2.1/src/outputformats.cpp:49: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 to_char[5] = {'A','C','G','T','N'};
data/sortmerna-2.1/src/outputformats.cpp:270: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 to_char[5] = {'A','C','G','T','N'};
data/sortmerna-2.1/src/outputformats.cpp:367:38:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ( fastxout_gv ) acceptedreads.open(acceptedstrings, ios::app);
data/sortmerna-2.1/src/paralleltraversal.cpp:100: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 nt_table[128] = {
data/sortmerna-2.1/src/paralleltraversal.cpp:122: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 complement[4] = {3,2,1,0};
data/sortmerna-2.1/src/paralleltraversal.cpp:455:17:  [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).
    acceptedsam.open (acceptedstrings_sam);
data/sortmerna-2.1/src/paralleltraversal.cpp:484:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char fastafile_name[2000];
data/sortmerna-2.1/src/paralleltraversal.cpp:488:25:  [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 *fastafile = fopen ((char*)(myfiles[index_num].first).c_str(),"r");
data/sortmerna-2.1/src/paralleltraversal.cpp:646: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.
          char s[len_id+1];
data/sortmerna-2.1/src/paralleltraversal.cpp:695: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).
  FILE *fp = fopen(ptr_dbfile,"r");
data/sortmerna-2.1/src/paralleltraversal.cpp:813: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 get_char[4] = {'A','C','G','T'};
data/sortmerna-2.1/src/paralleltraversal.cpp:996:11:  [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( dst, &newnode[0], sizeof(NodeElement)*4);
data/sortmerna-2.1/src/paralleltraversal.cpp:1060:19:  [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( (NodeElement*)dst, &newnode[0], sizeof(NodeElement)*4);
data/sortmerna-2.1/src/paralleltraversal.cpp:1088:19:  [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( (void*)dst, (void*)bucket, sizeofbucket);
data/sortmerna-2.1/src/paralleltraversal.cpp:1296:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fd = open(fname.c_str(), O_RDONLY)) == -1)
data/sortmerna-2.1/src/paralleltraversal.cpp:1333: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 *fp = fopen(inputreads,"r");
data/sortmerna-2.1/src/paralleltraversal.cpp:1425: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 suffix[20] = "out";
data/sortmerna-2.1/src/paralleltraversal.cpp:1430: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( suffix, "fasta");
data/sortmerna-2.1/src/paralleltraversal.cpp:1432: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( suffix, "fastq");
data/sortmerna-2.1/src/paralleltraversal.cpp:1443: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 pidStr[4000];
data/sortmerna-2.1/src/paralleltraversal.cpp:1447:5:  [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(pidStr,"%d",pid);
data/sortmerna-2.1/src/paralleltraversal.cpp:1471:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      acceptedreads.open ( acceptedstrings );
data/sortmerna-2.1/src/paralleltraversal.cpp:1489:7:  [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( acceptedstrings_sam, ".sam");            
data/sortmerna-2.1/src/paralleltraversal.cpp:1490:19:  [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).
      acceptedsam.open ( acceptedstrings_sam );
data/sortmerna-2.1/src/paralleltraversal.cpp:1508:7:  [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( acceptedstrings_blast, ".blast");            
data/sortmerna-2.1/src/paralleltraversal.cpp:1509:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      acceptedblast.open ( acceptedstrings_blast );
data/sortmerna-2.1/src/paralleltraversal.cpp:1528:7:  [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( logoutfile, ".log");
data/sortmerna-2.1/src/paralleltraversal.cpp:1530:17:  [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).
      logstream.open ( logoutfile );
data/sortmerna-2.1/src/paralleltraversal.cpp:1549:7:  [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( acceptedotumap_file, "_otus.txt");        
data/sortmerna-2.1/src/paralleltraversal.cpp:1550:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      otumap.open ( acceptedotumap_file );
data/sortmerna-2.1/src/paralleltraversal.cpp:1568:7:  [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( denovo_otus_file, "_denovo.");
data/sortmerna-2.1/src/paralleltraversal.cpp:1571:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      denovo_otu.open ( denovo_otus_file );
data/sortmerna-2.1/src/paralleltraversal.cpp:1593:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      otherreads.open( ptr_filetype_or );
data/sortmerna-2.1/src/paralleltraversal.cpp:1607:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      FILE* bilan = fopen(logoutfile,"w");
data/sortmerna-2.1/src/paralleltraversal.cpp:1717: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).
    FILE* bilan = fopen(logoutfile,"w");
data/sortmerna-2.1/src/paralleltraversal.cpp:1790:19:  [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).
      acceptedsam.open(acceptedstrings_sam, ios::app);
data/sortmerna-2.1/src/paralleltraversal.cpp:1799:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      acceptedblast.open(acceptedstrings_blast, ios::app);
data/sortmerna-2.1/src/paralleltraversal.cpp:2341:13:  [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 myread[READLEN] = "";
data/sortmerna-2.1/src/paralleltraversal.cpp:2433: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.
              char myread_rc[READLEN] = "";
data/sortmerna-2.1/src/paralleltraversal.cpp:2440:15:  [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(&myread[0],&myread_rc[0],READLEN);
data/sortmerna-2.1/src/paralleltraversal.cpp:3096:8:  [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(bigger_alignment_array, alignment->second.ptr, sizeof(s_align)*array_max_size);
data/sortmerna-2.1/src/paralleltraversal.cpp:3270: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.
                                    char to_char[5] = {'A','C','G','T','N'};
data/sortmerna-2.1/src/paralleltraversal.cpp:3810:17:  [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 myread[READLEN];
data/sortmerna-2.1/src/paralleltraversal.cpp:3879:17:  [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 to_char[5] = {'A','C','G','T','N'};
data/sortmerna-2.1/src/paralleltraversal.cpp:3961: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 ref_seq_arr[4000] = "";
data/sortmerna-2.1/src/paralleltraversal.cpp:3968: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 read_seq_arr[4000] = "";
data/sortmerna-2.1/src/paralleltraversal.cpp:4277: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).
    FILE* bilan = fopen(logoutfile,"a");
data/sortmerna-2.1/src/ssw.c:989: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 to_char[5] = {'A','C','G','T','N'};
data/sortmerna-2.1/src/ssw_example.c: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 ref_seq[40] = {'C', 'A', 'G', 'C', 'C', 'T', 'T', 'T', 'C', 'T', 'G', 'A', 'C', 'C', 'C', 'G', 'G', 'A', 'A', 'A', 'T', 
data/sortmerna-2.1/src/ssw_example.c: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 read_seq[16] = {'C', 'T', 'G', 'A', 'G', 'C', 'C', 'G', 'G', 'T', 'A', 'A', 'A', 'T', 'C', '\0'};	// read sequence
data/sortmerna-2.1/alp/gumbel_params.cpp:507:10:  [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.
long int mismatch,//NEW - SW score for a mismatch,
data/sortmerna-2.1/alp/gumbel_params.cpp:551:73:  [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 ? ScoringMatrix_Njn[i][j] = match : ScoringMatrix_Njn[i][j] = mismatch; 
data/sortmerna-2.1/alp/gumbel_params.cpp:716:3:  [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.
		mismatch,
data/sortmerna-2.1/alp/gumbel_params.hpp:113:12:  [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.
		long int mismatch,//NEW - SW score for a mismatch,
data/sortmerna-2.1/alp/njn_stringutil.cpp:157:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    reverse (symbols_, symbols_ + strlen (symbols_));
data/sortmerna-2.1/alp/njn_stringutil.cpp:159:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    reverse (symbols_, symbols_ + strlen (symbols_));
data/sortmerna-2.1/alp/njn_stringutil.cpp:244:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    reverse (symbols_, symbols_ + strlen (symbols_));
data/sortmerna-2.1/alp/njn_stringutil.cpp:246:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    reverse (symbols_, symbols_ + strlen (symbols_));
data/sortmerna-2.1/alp/njn_stringutil.cpp:326: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).
    if (symbols_ [strlen (symbols_) - 1] == '\r') symbols_ [strlen (symbols_) - 1] = '\0';
data/sortmerna-2.1/alp/njn_stringutil.cpp:326: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).
    if (symbols_ [strlen (symbols_) - 1] == '\r') symbols_ [strlen (symbols_) - 1] = '\0';
data/sortmerna-2.1/alp/njn_stringutil.cpp:339: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).
    assert (strlen (symbols_) != 0);
data/sortmerna-2.1/alp/sls_alp_data.cpp:64:10:  [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.
long int mismatch,
data/sortmerna-2.1/alp/sls_alp_data.cpp:120:54:  [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 ? d_smatr[i][j] = match : d_smatr[i][j] = mismatch; 
data/sortmerna-2.1/alp/sls_alp_data.hpp:357:13:  [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.
			long int mismatch,//NEW
data/sortmerna-2.1/cmph/bdz.c:408:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		mph->key_source->read(mph->key_source->data, &key, &keylen);
data/sortmerna-2.1/cmph/bdz_ph.c:366:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		mph->key_source->read(mph->key_source->data, &key, &keylen);
data/sortmerna-2.1/cmph/bmz.c:428:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		mph->key_source->read(mph->key_source->data, &key, &keylen);
data/sortmerna-2.1/cmph/bmz8.c:435:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		mph->key_source->read(mph->key_source->data, &key, &keylen);
data/sortmerna-2.1/cmph/brz.c:83: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).
		size_t len = strlen((char *)tmp_dir);
data/sortmerna-2.1/cmph/brz.c:250:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		mph->key_source->read(mph->key_source->data, &key, &keylen);
data/sortmerna-2.1/cmph/brz.c:281:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			filename = (char *)calloc(strlen((char *)(brz->tmp_dir)) + 11, sizeof(char));
data/sortmerna-2.1/cmph/brz.c:341:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		filename = (char *)calloc(strlen((char *)(brz->tmp_dir)) + 11, sizeof(char));
data/sortmerna-2.1/cmph/brz.c:368: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).
	nbytes = fwrite(cmph_names[CMPH_BRZ], (size_t)(strlen(cmph_names[CMPH_BRZ]) + 1), (size_t)1, brz->mphf_fd);
data/sortmerna-2.1/cmph/brz.c:383:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		filename = (char *)calloc(strlen((char *)(brz->tmp_dir)) + 11, sizeof(char));
data/sortmerna-2.1/cmph/chd_ph.c:239:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			mph->key_source->read(mph->key_source->data, &key, &keylen);
data/sortmerna-2.1/cmph/chm.c:180:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		mph->key_source->read(mph->key_source->data, &key, &keylen);
data/sortmerna-2.1/cmph/cmph.c:67: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).
		*key = (char *)realloc(*key, *keylen + strlen(buf) + 1);
data/sortmerna-2.1/cmph/cmph.c:68: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).
		memcpy(*key + *keylen, buf, strlen(buf));
data/sortmerna-2.1/cmph/cmph.c:69: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).
		*keylen += (cmph_uint32)strlen(buf);
data/sortmerna-2.1/cmph/cmph.c:70: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).
		if (buf[strlen(buf) - 1] != '\n') continue;
data/sortmerna-2.1/cmph/cmph.c:113: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).
        *keylen = (cmph_uint32)strlen(keys_vd[cmph_vector->position]);
data/sortmerna-2.1/cmph/cmph.c:165: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).
		if (buf[strlen(buf) - 1] != '\n') continue;
data/sortmerna-2.1/cmph/cmph.h:21:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int (*read)(void *, char **, cmph_uint32 *);
data/sortmerna-2.1/cmph/cmph_structs.c:28:51:  [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).
	nbytes = fwrite(cmph_names[mphf->algo], (size_t)(strlen(cmph_names[mphf->algo]) + 1), (size_t)1, fd); 
data/sortmerna-2.1/cmph/debug.h:26: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).
	size_t plen = strlen(p);
data/sortmerna-2.1/cmph/debug.h:28:28:  [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).
	f = (char *)malloc(plen + strlen(format) + 1);
data/sortmerna-2.1/cmph/debug.h:31:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(f + plen, format, strlen(format) + 1);
data/sortmerna-2.1/cmph/fch.c:103:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		mph->key_source->read(mph->key_source->data, &key, &keylen);
data/sortmerna-2.1/cmph/hash.c:69: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).
	*buf = (char *)malloc(strlen(cmph_hash_names[state->hashfunc]) + 1 + *buflen);
data/sortmerna-2.1/cmph/hash.c:70: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).
	memcpy(*buf, cmph_hash_names[state->hashfunc], strlen(cmph_hash_names[state->hashfunc]) + 1);
data/sortmerna-2.1/cmph/hash.c:73: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).
	memcpy(*buf + strlen(cmph_hash_names[state->hashfunc]) + 1, algobuf, len);
data/sortmerna-2.1/cmph/hash.c:74:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	*buflen  = (cmph_uint32)strlen(cmph_hash_names[state->hashfunc]) + 1 + *buflen;
data/sortmerna-2.1/cmph/hash.c:109: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).
	offset = (cmph_uint32)strlen(cmph_hash_names[hashfunc]) + 1;
data/sortmerna-2.1/include/paralleltraversal.hpp:141:29:  [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.
                    int32_t mismatch,
data/sortmerna-2.1/include/ssw.h:91:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
s_profile* ssw_init (const int8_t* read, const int32_t readLen, const int8_t* mat, const int32_t n, const int8_t score_size);
data/sortmerna-2.1/src/indexdb.cpp:1339:35:  [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.
    if (*(ptr_tmpdir_t-2) != '/') strcat(tmp_str,"/");
data/sortmerna-2.1/src/indexdb.cpp:1379:37:  [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.
      if (*(ptr_tmpdir_t-2) != '/') strcat(tmp_str,"/");
data/sortmerna-2.1/src/indexdb.cpp:1533:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      nt = fgetc(fp);
data/sortmerna-2.1/src/indexdb.cpp:1553:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        nt = fgetc(fp);
data/sortmerna-2.1/src/indexdb.cpp:1563:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      nt = fgetc(fp);
data/sortmerna-2.1/src/indexdb.cpp:1572:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        nt = fgetc(fp);
data/sortmerna-2.1/src/indexdb.cpp:1683:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      nt = fgetc(fp);
data/sortmerna-2.1/src/indexdb.cpp:1686:33:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while ( nt != '\n' ) nt = fgetc(fp);
data/sortmerna-2.1/src/indexdb.cpp:1693:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      nt = fgetc(fp);
data/sortmerna-2.1/src/indexdb.cpp:1704:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        nt = fgetc(fp);
data/sortmerna-2.1/src/indexdb.cpp:1725:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          c = fgetc(fp);
data/sortmerna-2.1/src/indexdb.cpp:1972:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
       nt = fgetc(fp);
data/sortmerna-2.1/src/indexdb.cpp:1979:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
         nt = fgetc(fp);
data/sortmerna-2.1/src/indexdb.cpp:1989:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
       nt = fgetc(fp);
data/sortmerna-2.1/src/indexdb.cpp:1999:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
         nt = fgetc(fp);
data/sortmerna-2.1/src/indexdb.cpp:2062:51:  [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).
         id = cmph_search(hash, key, (cmph_uint32)strlen(key));
data/sortmerna-2.1/src/main.cpp:666:18:  [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.
            if ( mismatch > 0 )
data/sortmerna-2.1/src/main.cpp:1448:42:  [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.
  if ( !match_ambiguous_N_gv ) score_N = mismatch;
data/sortmerna-2.1/src/main.cpp:1512:22:  [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.
                     mismatch,
data/sortmerna-2.1/src/paralleltraversal.cpp:478:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      stats.read(reinterpret_cast<char*>(&filesize), sizeof(size_t));
data/sortmerna-2.1/src/paralleltraversal.cpp:482:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      stats.read(reinterpret_cast<char*>(&fastafile_len), sizeof(uint32_t));
data/sortmerna-2.1/src/paralleltraversal.cpp:485:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      stats.read(reinterpret_cast<char*>(fastafile_name), sizeof(char)*fastafile_len);
data/sortmerna-2.1/src/paralleltraversal.cpp:510:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      stats.read(reinterpret_cast<char*>(&background_freq_gv), sizeof(double)*4);
data/sortmerna-2.1/src/paralleltraversal.cpp:513:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      stats.read(reinterpret_cast<char*>(&full_ref[index_num]), sizeof(uint64_t));
data/sortmerna-2.1/src/paralleltraversal.cpp:516:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      stats.read(reinterpret_cast<char*>(&lnwin[index_num]), sizeof(uint32_t));
data/sortmerna-2.1/src/paralleltraversal.cpp:519:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      stats.read(reinterpret_cast<char*>(&numseq[index_num]), sizeof(uint32_t));
data/sortmerna-2.1/src/paralleltraversal.cpp:535:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      stats.read(reinterpret_cast<char*>(&num_index_parts[index_num]), sizeof(uint16_t));
data/sortmerna-2.1/src/paralleltraversal.cpp:542:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        stats.read(reinterpret_cast<char*>(&stats_hold), sizeof(index_parts_stats));
data/sortmerna-2.1/src/paralleltraversal.cpp:605:38:  [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.
                                     mismatch,//NEW - SW score for a mismatch,
data/sortmerna-2.1/src/paralleltraversal.cpp:636:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        stats.read(reinterpret_cast<char*>(&num_sq), sizeof(uint32_t));
data/sortmerna-2.1/src/paralleltraversal.cpp:643:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          stats.read(reinterpret_cast<char*>(&len_id), sizeof(uint32_t));
data/sortmerna-2.1/src/paralleltraversal.cpp:648:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          stats.read(reinterpret_cast<char*>(&s), sizeof(char)*len_id);
data/sortmerna-2.1/src/paralleltraversal.cpp:652:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          stats.read(reinterpret_cast<char*>(&len_seq), sizeof(uint32_t));
data/sortmerna-2.1/src/paralleltraversal.cpp:715:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  char c = fgetc(fp);
data/sortmerna-2.1/src/paralleltraversal.cpp:726:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c = fgetc(fp);
data/sortmerna-2.1/src/paralleltraversal.cpp:740:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = fgetc(fp);
data/sortmerna-2.1/src/paralleltraversal.cpp:751:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c = fgetc(fp);
data/sortmerna-2.1/src/paralleltraversal.cpp:770:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c = fgetc(fp);
data/sortmerna-2.1/src/paralleltraversal.cpp:778:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = fgetc(fp);
data/sortmerna-2.1/src/paralleltraversal.cpp:786:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c = fgetc(fp);
data/sortmerna-2.1/src/paralleltraversal.cpp:930:49:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  for ( uint32_t i = 0; i < limit; i++ ) inkmer.read(reinterpret_cast<char*>(&(lookup_tbl[i].count)), sizeof(uint32_t));
data/sortmerna-2.1/src/paralleltraversal.cpp:959:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      btrie.read(reinterpret_cast<char*>(&sizeoftries[j]), sizeof(uint32_t));
data/sortmerna-2.1/src/paralleltraversal.cpp:1014:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            btrie.read(reinterpret_cast<char*>(&tmp), sizeof(char));
data/sortmerna-2.1/src/paralleltraversal.cpp:1050:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    btrie.read(reinterpret_cast<char*>(&tmp), sizeof(char));
data/sortmerna-2.1/src/paralleltraversal.cpp:1073:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                  btrie.read(reinterpret_cast<char*>(&sizeofbucket), sizeof(uint32_t));
data/sortmerna-2.1/src/paralleltraversal.cpp:1085:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                  btrie.read(reinterpret_cast<char*>(bucket), sizeofbucket);
data/sortmerna-2.1/src/paralleltraversal.cpp:1147:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  inreff.read(reinterpret_cast<char*>(&number_elements), sizeof(uint32_t));
data/sortmerna-2.1/src/paralleltraversal.cpp:1159:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    inreff.read(reinterpret_cast<char*>(&size), sizeof(uint32_t));
data/sortmerna-2.1/src/paralleltraversal.cpp:1171:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    inreff.read(reinterpret_cast<char*>(positions_tbl[i].arr), sizeof(seq_pos)*size);
data/sortmerna-2.1/src/paralleltraversal.cpp:1244:28:  [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.
                   int32_t mismatch,
data/sortmerna-2.1/src/paralleltraversal.cpp:1307:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if ((rb = read(fd, &c, 1)) == -1)
data/sortmerna-2.1/src/paralleltraversal.cpp:1343:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while ( (ch = getc(fp)) != EOF )
data/sortmerna-2.1/src/paralleltraversal.cpp:1349:25:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          while ( (ch = getc(fp)) != '\n' );
data/sortmerna-2.1/src/paralleltraversal.cpp:1352:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ch = getc(fp);
data/sortmerna-2.1/src/paralleltraversal.cpp:1358:16:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          ch = getc(fp);
data/sortmerna-2.1/src/paralleltraversal.cpp:1368:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while ( (ch = getc(fp)) != EOF )
data/sortmerna-2.1/src/paralleltraversal.cpp:1465:9:  [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 ( acceptedstrings, "_");
data/sortmerna-2.1/src/paralleltraversal.cpp:1468: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 ( acceptedstrings, ".");
data/sortmerna-2.1/src/paralleltraversal.cpp:1486:9:  [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( acceptedstrings_sam, "_");
data/sortmerna-2.1/src/paralleltraversal.cpp:1505:9:  [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( acceptedstrings_blast, "_");
data/sortmerna-2.1/src/paralleltraversal.cpp:1525:9:  [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( logoutfile, "_");
data/sortmerna-2.1/src/paralleltraversal.cpp:1546:9:  [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( acceptedotumap_file, "_");
data/sortmerna-2.1/src/paralleltraversal.cpp:1565:9:  [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( denovo_otus_file, "_");
data/sortmerna-2.1/src/paralleltraversal.cpp:1586:9:  [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( ptr_filetype_or, "_");
data/sortmerna-2.1/src/paralleltraversal.cpp:1589: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 ( ptr_filetype_or, "." );
data/sortmerna-2.1/src/paralleltraversal.cpp:1629:37:  [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.
        mat[k++] = l == m ? match : mismatch; // weight_match : weight_mismatch (must be negative)
data/sortmerna-2.1/src/paralleltraversal.cpp:1669:19:  [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.
                  mismatch,
data/sortmerna-2.1/src/paralleltraversal.cpp:1694:36:  [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.
  eprintf("    SW mismatch = %d\n",mismatch);
data/sortmerna-2.1/src/paralleltraversal.cpp:1750:44:  [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.
    fprintf(bilan,"    SW mismatch = %d\n",mismatch);
data/sortmerna-2.1/src/ssw.c:77:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int32_t read;    //alignment ending position on read, 0-based 
data/sortmerna-2.1/src/ssw.c:88:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	const int8_t* read;
data/sortmerna-2.1/src/ssw.c:570:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				 const int8_t* read, 
data/sortmerna-2.1/src/ssw.c:651:39:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				temp2 = h_b[d] + mat[ref[j] * n + read[i]];
data/sortmerna-2.1/src/ssw.c:779:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
s_profile* ssw_init (const int8_t* read, const int32_t readLen, const int8_t* mat, const int32_t n, const int8_t score_size) {
data/sortmerna-2.1/src/ssw.c:797:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		p->profile_byte = qP_byte (read, mat, readLen, n, bias);
data/sortmerna-2.1/src/ssw.c:799:69:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (score_size == 1 || score_size == 2) p->profile_word = qP_word (read, mat, readLen, n);
data/sortmerna-2.1/src/ssw.c:800:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	p->read = read;
data/sortmerna-2.1/src/ssw.c:873:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r->read_end1 = bests[0].read;
data/sortmerna-2.1/src/ssw.c:888:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	read_reverse = seq_reverse(prof->read, r->read_end1);
data/sortmerna-2.1/src/ssw.c:901:51:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	r->read_begin1 = r->read_end1 - bests_reverse[0].read;
data/sortmerna-2.1/src/ssw_example.c:136:57:  [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.
		for (m = 0; m < 4; ++m) mat[k++] = l == m ? match : - mismatch;	/* weight_match : -weight_mismatch */

ANALYSIS SUMMARY:

Hits = 419
Lines analyzed = 43914 in approximately 1.15 seconds (38315 lines/second)
Physical Source Lines of Code (SLOC) = 30462
Hits@level = [0] 659 [1] 126 [2] 243 [3]   3 [4]  47 [5]   0
Hits@level+ = [0+] 1078 [1+] 419 [2+] 293 [3+]  50 [4+]  47 [5+]   0
Hits/KSLOC@level+ = [0+] 35.3884 [1+] 13.7548 [2+] 9.61854 [3+] 1.64139 [4+] 1.54291 [5+]   0
Dot directories skipped = 4 (--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.