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/cryptominisat-5.8.0+dfsg1/src/GitSHA1.h
Examining data/cryptominisat-5.8.0+dfsg1/src/MersenneTwister.h
Examining data/cryptominisat-5.8.0+dfsg1/src/Vec.h
Examining data/cryptominisat-5.8.0+dfsg1/src/XAlloc.h
Examining data/cryptominisat-5.8.0+dfsg1/src/alg.h
Examining data/cryptominisat-5.8.0+dfsg1/src/avgcalc.h
Examining data/cryptominisat-5.8.0+dfsg1/src/bitarray.h
Examining data/cryptominisat-5.8.0+dfsg1/src/boundedqueue.h
Examining data/cryptominisat-5.8.0+dfsg1/src/bva.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/bva.h
Examining data/cryptominisat-5.8.0+dfsg1/src/cardfinder.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/cardfinder.h
Examining data/cryptominisat-5.8.0+dfsg1/src/ccnr.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/ccnr.h
Examining data/cryptominisat-5.8.0+dfsg1/src/ccnr_cms.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/ccnr_cms.h
Examining data/cryptominisat-5.8.0+dfsg1/src/ccnr_mersenne.h
Examining data/cryptominisat-5.8.0+dfsg1/src/cl_predictors.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/cl_predictors.h
Examining data/cryptominisat-5.8.0+dfsg1/src/clabstraction.h
Examining data/cryptominisat-5.8.0+dfsg1/src/clause.h
Examining data/cryptominisat-5.8.0+dfsg1/src/clauseallocator.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/clauseallocator.h
Examining data/cryptominisat-5.8.0+dfsg1/src/clausecleaner.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/clausecleaner.h
Examining data/cryptominisat-5.8.0+dfsg1/src/clausedumper.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/clausedumper.h
Examining data/cryptominisat-5.8.0+dfsg1/src/cloffset.h
Examining data/cryptominisat-5.8.0+dfsg1/src/clustering.h
Examining data/cryptominisat-5.8.0+dfsg1/src/cms_bosphorus.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/cms_bosphorus.h
Examining data/cryptominisat-5.8.0+dfsg1/src/cms_breakid.h
Examining data/cryptominisat-5.8.0+dfsg1/src/cnf.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/cnf.h
Examining data/cryptominisat-5.8.0+dfsg1/src/compfinder.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/compfinder.h
Examining data/cryptominisat-5.8.0+dfsg1/src/comphandler.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/comphandler.h
Examining data/cryptominisat-5.8.0+dfsg1/src/completedetachreattacher.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/completedetachreattacher.h
Examining data/cryptominisat-5.8.0+dfsg1/src/constants.h
Examining data/cryptominisat-5.8.0+dfsg1/src/cryptominisat.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/cryptominisat_c.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/cset.h
Examining data/cryptominisat-5.8.0+dfsg1/src/datasync.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/datasync.h
Examining data/cryptominisat-5.8.0+dfsg1/src/datasyncserver.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/datasyncserver.h
Examining data/cryptominisat-5.8.0+dfsg1/src/dimacsparser.h
Examining data/cryptominisat-5.8.0+dfsg1/src/distillerlong.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/distillerlong.h
Examining data/cryptominisat-5.8.0+dfsg1/src/distillerlongwithimpl.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/distillerlongwithimpl.h
Examining data/cryptominisat-5.8.0+dfsg1/src/drat.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/drat.h
Examining data/cryptominisat-5.8.0+dfsg1/src/fuzz.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/gatefinder.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/gatefinder.h
Examining data/cryptominisat-5.8.0+dfsg1/src/gaussian.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/gaussian.h
Examining data/cryptominisat-5.8.0+dfsg1/src/gausswatched.h
Examining data/cryptominisat-5.8.0+dfsg1/src/gqueuedata.h
Examining data/cryptominisat-5.8.0+dfsg1/src/hasher.h
Examining data/cryptominisat-5.8.0+dfsg1/src/heap.h
Examining data/cryptominisat-5.8.0+dfsg1/src/hyperengine.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/hyperengine.h
Examining data/cryptominisat-5.8.0+dfsg1/src/intree.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/intree.h
Examining data/cryptominisat-5.8.0+dfsg1/src/ipasir.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/ipasir.h
Examining data/cryptominisat-5.8.0+dfsg1/src/lucky.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/lucky.h
Examining data/cryptominisat-5.8.0+dfsg1/src/main.h
Examining data/cryptominisat-5.8.0+dfsg1/src/main_common.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/main_common.h
Examining data/cryptominisat-5.8.0+dfsg1/src/main_emscripten.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/main_exe.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/main_simple.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/matrixfinder.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/matrixfinder.h
Examining data/cryptominisat-5.8.0+dfsg1/src/mpi/DataSync.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/mpi/DataSync.h
Examining data/cryptominisat-5.8.0+dfsg1/src/msvc/stdint.h
Examining data/cryptominisat-5.8.0+dfsg1/src/mystack.h
Examining data/cryptominisat-5.8.0+dfsg1/src/nomutex.h
Examining data/cryptominisat-5.8.0+dfsg1/src/occsimplifier.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/occsimplifier.h
Examining data/cryptominisat-5.8.0+dfsg1/src/packedmatrix.h
Examining data/cryptominisat-5.8.0+dfsg1/src/packedrow.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/packedrow.h
Examining data/cryptominisat-5.8.0+dfsg1/src/popcnt.h
Examining data/cryptominisat-5.8.0+dfsg1/src/predict_func_type.h
Examining data/cryptominisat-5.8.0+dfsg1/src/propby.h
Examining data/cryptominisat-5.8.0+dfsg1/src/propby_backup.h
Examining data/cryptominisat-5.8.0+dfsg1/src/propbyforgraph.h
Examining data/cryptominisat-5.8.0+dfsg1/src/propengine.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/propengine.h
Examining data/cryptominisat-5.8.0+dfsg1/src/reducedb.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/reducedb.h
Examining data/cryptominisat-5.8.0+dfsg1/src/satzilla_features.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/satzilla_features.h
Examining data/cryptominisat-5.8.0+dfsg1/src/satzilla_features_calc.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/satzilla_features_calc.h
Examining data/cryptominisat-5.8.0+dfsg1/src/satzilla_features_to_reconf.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/satzilla_features_to_reconf.h
Examining data/cryptominisat-5.8.0+dfsg1/src/sccfinder.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/sccfinder.h
Examining data/cryptominisat-5.8.0+dfsg1/src/searcher.h
Examining data/cryptominisat-5.8.0+dfsg1/src/searchhist.h
Examining data/cryptominisat-5.8.0+dfsg1/src/searchstats.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/searchstats.h
Examining data/cryptominisat-5.8.0+dfsg1/src/shareddata.h
Examining data/cryptominisat-5.8.0+dfsg1/src/signalcode.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/signalcode.h
Examining data/cryptominisat-5.8.0+dfsg1/src/simplefile.h
Examining data/cryptominisat-5.8.0+dfsg1/src/sls.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/sls.h
Examining data/cryptominisat-5.8.0+dfsg1/src/solutionextender.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/solutionextender.h
Examining data/cryptominisat-5.8.0+dfsg1/src/solver.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/solver.h
Examining data/cryptominisat-5.8.0+dfsg1/src/solverconf.h
Examining data/cryptominisat-5.8.0+dfsg1/src/solvertypes.h
Examining data/cryptominisat-5.8.0+dfsg1/src/sql_tablestructure.h
Examining data/cryptominisat-5.8.0+dfsg1/src/sqlitestats.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/sqlitestats.h
Examining data/cryptominisat-5.8.0+dfsg1/src/sqlstats.h
Examining data/cryptominisat-5.8.0+dfsg1/src/str_impl_w_impl.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/str_impl_w_impl.h
Examining data/cryptominisat-5.8.0+dfsg1/src/streambuffer.h
Examining data/cryptominisat-5.8.0+dfsg1/src/subsumeimplicit.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/subsumeimplicit.h
Examining data/cryptominisat-5.8.0+dfsg1/src/subsumestrengthen.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/subsumestrengthen.h
Examining data/cryptominisat-5.8.0+dfsg1/src/time_mem.h
Examining data/cryptominisat-5.8.0+dfsg1/src/toplevelgauss.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/toplevelgauss.h
Examining data/cryptominisat-5.8.0+dfsg1/src/toplevelgaussabst.h
Examining data/cryptominisat-5.8.0+dfsg1/src/touchlist.h
Examining data/cryptominisat-5.8.0+dfsg1/src/trim.h
Examining data/cryptominisat-5.8.0+dfsg1/src/vardata.h
Examining data/cryptominisat-5.8.0+dfsg1/src/vardistgen.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/vardistgen.h
Examining data/cryptominisat-5.8.0+dfsg1/src/varreplacer.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/varreplacer.h
Examining data/cryptominisat-5.8.0+dfsg1/src/varupdatehelper.h
Examining data/cryptominisat-5.8.0+dfsg1/src/vmtf.h
Examining data/cryptominisat-5.8.0+dfsg1/src/walksat.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/walksat.h
Examining data/cryptominisat-5.8.0+dfsg1/src/watchalgos.h
Examining data/cryptominisat-5.8.0+dfsg1/src/watcharray.h
Examining data/cryptominisat-5.8.0+dfsg1/src/watcharray_handrolled.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/watcharray_handrolled.h
Examining data/cryptominisat-5.8.0+dfsg1/src/watched.h
Examining data/cryptominisat-5.8.0+dfsg1/src/watched_backup.h
Examining data/cryptominisat-5.8.0+dfsg1/src/xor.h
Examining data/cryptominisat-5.8.0+dfsg1/src/xorfinder.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/xorfinder.h
Examining data/cryptominisat-5.8.0+dfsg1/src/yals.c
Examining data/cryptominisat-5.8.0+dfsg1/src/yals.h
Examining data/cryptominisat-5.8.0+dfsg1/src/yalsat.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/yalsat.h
Examining data/cryptominisat-5.8.0+dfsg1/src/yils.h
Examining data/cryptominisat-5.8.0+dfsg1/src/cms_breakid.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/main.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/searcher.cpp
Examining data/cryptominisat-5.8.0+dfsg1/src/solverconf.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/assump_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/basic_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/c_test.c
Examining data/cryptominisat-5.8.0+dfsg1/tests/cardfinder_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/clause_alloc_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/clause_cleaner_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/clause_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/comp_find_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/comphandler_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/distill_klee.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/distill_long_with_implicit_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/distiller_all_with_all_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/dump_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/gauss_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/heap_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/implied_by_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/intree_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/ipasir_example.c
Examining data/cryptominisat-5.8.0+dfsg1/tests/ipasir_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/lucky_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/matrixfinder_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/multisol_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/readme_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/scc_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/searcher_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/solver_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/stp_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/subsume_impl_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/ternary_resolve_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/test_helper.h
Examining data/cryptominisat-5.8.0+dfsg1/tests/vrepl_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/tests/xorfinder_test.cpp
Examining data/cryptominisat-5.8.0+dfsg1/utils/minimal_cms/minimal_cms.cpp

FINAL RESULTS:

data/cryptominisat-5.8.0+dfsg1/src/yals.c:467:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf (stderr, fmt, ap);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:481:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf (stderr, fmt, ap);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:494:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf (yals->out, fmt, ap);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:507:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf (yals->out, fmt, ap);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:548:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf (yals->out, fmt, ap);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:690:10:  [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).
  return strcpy (yals_malloc (yals, strlen (str) + 1), str);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:885:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf (yals->out, fmt, ap);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:2368:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (BUFFER, "--%s=%d..%d", #NAME, (MIN), (MAX)); \
data/cryptominisat-5.8.0+dfsg1/src/yals.c:2401:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (env, "yals%s",name);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:2403:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if ((str = getenv (env))) {
data/cryptominisat-5.8.0+dfsg1/src/yals.c:2479:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if (getenv ("YALSAMPLES") && getenv ("YALSMOD")) {
data/cryptominisat-5.8.0+dfsg1/src/yals.c:2479:32:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if (getenv ("YALSAMPLES") && getenv ("YALSMOD")) {
data/cryptominisat-5.8.0+dfsg1/src/yals.c:2480:19:  [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.
    int s = atoi (getenv ("YALSAMPLES")), i;
data/cryptominisat-5.8.0+dfsg1/src/yals.c:2481:19:  [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.
    int m = atoi (getenv ("YALSMOD"));
data/cryptominisat-5.8.0+dfsg1/src/yals.c:2561:11:  [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.
  assert (getenv ("YALSLEAK") || !yals->stats.allocated.current);
data/cryptominisat-5.8.0+dfsg1/tests/clause_alloc_test.cpp:54:5:  [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(0);
data/cryptominisat-5.8.0+dfsg1/src/MersenneTwister.h:265: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* urandom = fopen( "/dev/urandom", "rb" );
data/cryptominisat-5.8.0+dfsg1/src/bitarray.h:59: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(mp, b.mp, size*sizeof(uint64_t));
data/cryptominisat-5.8.0+dfsg1/src/clauseallocator.cpp:204: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(new_ptr, old, sizeNeeded*sizeof(BASE_DATA_TYPE));
data/cryptominisat-5.8.0+dfsg1/src/clausedumper.cpp:231:8:  [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(filename.c_str());
data/cryptominisat-5.8.0+dfsg1/src/cryptominisat.cpp:1042:16:  [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).
    data->log->open(filename.c_str(), std::ios::out);
data/cryptominisat-5.8.0+dfsg1/src/dimacsparser.h:374: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).
    partFile.open(s.c_str());
data/cryptominisat-5.8.0+dfsg1/src/drat.h:355: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(buf_ptr, del_buf, del_len);
data/cryptominisat-5.8.0+dfsg1/src/fuzz.cpp:48: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(buf, f.txt + f.at, toread);
data/cryptominisat-5.8.0+dfsg1/src/ipasir.cpp:60:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char tmp[200];
data/cryptominisat-5.8.0+dfsg1/src/ipasir.cpp:63: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(tmp, tmp2.c_str(), tmp2.length()+1);
data/cryptominisat-5.8.0+dfsg1/src/main.cpp:103: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 * in = fopen(filename.c_str(), "rb");
data/cryptominisat-5.8.0+dfsg1/src/main.cpp:1198: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).
        resultfile->open(resultFilename.c_str());
data/cryptominisat-5.8.0+dfsg1/src/main.cpp:1355:15:  [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).
    dumpfile->open(dump_red_fname.c_str());
data/cryptominisat-5.8.0+dfsg1/src/main.cpp:1427: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).
        tmp->open(assump_filename.c_str());
data/cryptominisat-5.8.0+dfsg1/src/main_common.cpp:41:23:  [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).
            dratfTmp->open(dratfilname.c_str(), std::ofstream::out | std::ofstream::binary);
data/cryptominisat-5.8.0+dfsg1/src/main_simple.cpp:195:24:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            FILE* in = fopen(argv[1], "rb");
data/cryptominisat-5.8.0+dfsg1/src/occsimplifier.h:310:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(lits, other.lits, sizeof(Lit)*3);
data/cryptominisat-5.8.0+dfsg1/src/packedmatrix.h:98: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(mp, b.mp, sizeof(int)*numRows*(numCols+1));
data/cryptominisat-5.8.0+dfsg1/src/propbyforgraph.h:79:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(lits, other.lits, sizeof(Lit)*3);
data/cryptominisat-5.8.0+dfsg1/src/propbyforgraph.h:88:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(lits, other.lits, sizeof(Lit)*3);
data/cryptominisat-5.8.0+dfsg1/src/solver.cpp:3530:26:  [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* input_stream = fopen(fname.c_str(), "r");
data/cryptominisat-5.8.0+dfsg1/src/yals.c:905: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 (yals->tmp, yals->vals, bytes);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:917: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 (yals->best, yals->vals, bytes);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:1761: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 (other_vals, yals->tmp, bytes);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:1800: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 (other_vals, yals->tmp, bytes);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:1881: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 (yals->vals, yals->best, bytes);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:1905: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 (yals->vals, PEEK (yals->cache, pos), bytes);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:2367:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char BUFFER[120]; int I; \
data/cryptominisat-5.8.0+dfsg1/src/yals.c:2404:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    val = atoi (str);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:2480:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int s = atoi (getenv ("YALSAMPLES")), i;
data/cryptominisat-5.8.0+dfsg1/src/yals.c:2481:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int m = atoi (getenv ("YALSMOD"));
data/cryptominisat-5.8.0+dfsg1/utils/minimal_cms/minimal_cms.cpp:41: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).
  proof_stream->open(drat.c_str(), std::ofstream::out | std::ofstream::binary);
data/cryptominisat-5.8.0+dfsg1/src/main_simple.cpp:83: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).
        int len = strlen(prefix);
data/cryptominisat-5.8.0+dfsg1/src/mpi/DataSync.cpp:290:52:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        data.push_back((uint32_t)solver.value(var).getchar());
data/cryptominisat-5.8.0+dfsg1/src/simplefile.h:120:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        inf->read((char*)&val, 4);
data/cryptominisat-5.8.0+dfsg1/src/simplefile.h:127:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        inf->read((char*)&val, 8);
data/cryptominisat-5.8.0+dfsg1/src/simplefile.h:140:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        inf->read((char*)&l, sizeof(lbool));
data/cryptominisat-5.8.0+dfsg1/src/simplefile.h:159:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        inf->read((char*)&d, sizeof(T));
data/cryptominisat-5.8.0+dfsg1/src/simplefile.h:167:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        inf->read((char*)ptr, num*elem_sz);
data/cryptominisat-5.8.0+dfsg1/src/streambuffer.h:36:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static inline int read(void* buf, size_t num, size_t count, gzFile f)
data/cryptominisat-5.8.0+dfsg1/src/streambuffer.h:44:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static inline int read(void* buf, size_t num, size_t count, FILE* f)
data/cryptominisat-5.8.0+dfsg1/src/streambuffer.h:51:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static inline int read(void* buf, size_t num, size_t count, const char*& f)
data/cryptominisat-5.8.0+dfsg1/src/streambuffer.h:57:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while(*f != 0 && read < toread) {
data/cryptominisat-5.8.0+dfsg1/src/streambuffer.h:63:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        return read;
data/cryptominisat-5.8.0+dfsg1/src/streambuffer.h:74:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            size = B::read(buf.get(), 1, chunk_limit, in);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:356:45:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  struct { long long all, crit, lits, occs, read, update, weight; } mems;
data/cryptominisat-5.8.0+dfsg1/src/yals.c:690:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return strcpy (yals_malloc (yals, strlen (str) + 1), str);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:695:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  yals_free (yals, str, strlen (str) + 1);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:1090:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ADD (read, p - occs);
data/cryptominisat-5.8.0+dfsg1/src/yals.c:2370:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for (I = 28 - strlen (BUFFER); I > 0; I--) fputc (' ', yals->out); \
data/cryptominisat-5.8.0+dfsg1/src/yals.c:2398:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int len = strlen (name) + strlen ("YALS") + 1, val, ch;
data/cryptominisat-5.8.0+dfsg1/src/yals.c:2398: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).
  int len = strlen (name) + strlen ("YALS") + 1, val, ch;
data/cryptominisat-5.8.0+dfsg1/src/yals.c:3274:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    all += s->mems.read;
data/cryptominisat-5.8.0+dfsg1/src/yals.c:3291:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      s->mems.read/M, yals_pct (s->mems.read, all),
data/cryptominisat-5.8.0+dfsg1/src/yals.c:3291:41:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      s->mems.read/M, yals_pct (s->mems.read, all),

ANALYSIS SUMMARY:

Hits = 71
Lines analyzed = 70337 in approximately 1.60 seconds (44075 lines/second)
Physical Source Lines of Code (SLOC) = 53112
Hits@level = [0]  20 [1]  23 [2]  32 [3]   7 [4]   9 [5]   0
Hits@level+ = [0+]  91 [1+]  71 [2+]  48 [3+]  16 [4+]   9 [5+]   0
Hits/KSLOC@level+ = [0+] 1.71336 [1+] 1.3368 [2+] 0.903751 [3+] 0.30125 [4+] 0.169453 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.