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/minizinc-2.5.2+dfsg1/lib/file_utils.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_par.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_call.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_arraylit.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_vardecl.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_comp.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_id.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_setlit.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_arrayaccess.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_binop.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_anon.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_ite.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/flatten/flat_exp.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_let.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_unop.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/MIPdomains.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/prettyprinter.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c
Examining data/minizinc-2.5.2+dfsg1/lib/json_parser.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/builtins.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/type.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/chain_compressor.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/cdecode.c
Examining data/minizinc-2.5.2+dfsg1/lib/ast.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/parser.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/astmap.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/solns2out.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/eval_par.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/values.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/passes/gecode_pass.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/passes/compile_pass.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/solver.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/flattener.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/typecheck.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/optimize_constraints.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/htmlprinter.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/statistics.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/solver_instance_base.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/astexception.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/flatten.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/pathfileprinter.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/cencode.c
Examining data/minizinc-2.5.2+dfsg1/lib/optimize.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/astvec.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/utils_savestream.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/param_config.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/solver_config.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/copy.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/aststring.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/output.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/gc.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/algorithms/min_cut.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/model.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/cached/regex_parser.tab.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/cached/regex_lexer.yy.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/cached/lexer.yy.cpp
Examining data/minizinc-2.5.2+dfsg1/lib/cached/parser.tab.cpp
Examining data/minizinc-2.5.2+dfsg1/include/minizinc/_thirdparty/b64/cencode.h
Examining data/minizinc-2.5.2+dfsg1/include/minizinc/_thirdparty/b64/cdecode.h
Examining data/minizinc-2.5.2+dfsg1/include/minizinc/_thirdparty/b64/decode.h
Examining data/minizinc-2.5.2+dfsg1/include/minizinc/_thirdparty/b64/encode.h
Examining data/minizinc-2.5.2+dfsg1/include/minizinc/_thirdparty/miniz.h
Examining data/minizinc-2.5.2+dfsg1/include/minizinc/ast.hpp
Examining data/minizinc-2.5.2+dfsg1/include/minizinc/solvers/MIP/MIP_solverinstance.hpp
Examining data/minizinc-2.5.2+dfsg1/include/minizinc/algorithms/min_cut.h
Examining data/minizinc-2.5.2+dfsg1/mzn2doc.cpp
Examining data/minizinc-2.5.2+dfsg1/minizinc.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/mzn/mzn_solverinstance.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/mzn/mzn_solverfactory.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/fzn/fzn_solverinstance.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/fzn/fzn_solverfactory.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_xpress_solverfactory.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_scip_wrap.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_cplex_solverfactory.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_xpress_wrap.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_osicbc_wrap.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_scip_solverfactory.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_cplex_wrap.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_gurobi_wrap.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_solverinstance.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_gurobi_solverfactory.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_osicbc_solverfactory.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_wrap.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/geas/geas_constraints.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/geas/geas_solverinstance.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/geas/geas_solverfactory.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/gecode/gecode_solverfactory.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/gecode/fzn_space.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/gecode/gecode_constraints.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/gecode/gecode_solverinstance.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/nl/nl_solreader.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/nl/nl_solverfactory.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/nl/nl_solverinstance.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/nl/nl_components.cpp
Examining data/minizinc-2.5.2+dfsg1/solvers/nl/nl_file.cpp

FINAL RESULTS:

data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:91:16:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
  ssize_t sz = readlink("/proc/self/exe", path, bufsz);
data/minizinc-2.5.2+dfsg1/lib/cached/parser.tab.cpp:2358:21:  [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 YYFPRINTF fprintf
data/minizinc-2.5.2+dfsg1/lib/cached/regex_parser.tab.cpp:692:21:  [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 YYFPRINTF fprintf
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:150:14:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
  char* rp = realpath(filename.c_str(), nullptr);
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:216: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.
  char* path_c = getenv("PATH");
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:309:28:  [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 (char* MZNSTDLIBDIR = getenv("MZN_STDLIB_DIR")) {
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:350:24:  [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 (const char* hd = getenv("HOME")) {
data/minizinc-2.5.2+dfsg1/lib/solver_config.cpp:228:13:  [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.
  char* p = getenv(v);
data/minizinc-2.5.2+dfsg1/mzn2doc.cpp:47:28:  [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 (char* MZNSTDLIBDIR = getenv("MZN_STDLIB_DIR")) {
data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_cplex_wrap.cpp:57:12:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
    return LoadLibrary(file.c_str());
data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_cplex_wrap.cpp:59:10:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
  return LoadLibrary((file + ".dll").c_str());
data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_gurobi_wrap.cpp:265:12:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
    return LoadLibrary(file);
data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_gurobi_wrap.cpp:267:10:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
  return LoadLibrary((std::string(file) + ".dll").c_str());
data/minizinc-2.5.2+dfsg1/include/minizinc/_thirdparty/miniz.h:1063: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 m_filename[MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE];
data/minizinc-2.5.2+dfsg1/include/minizinc/_thirdparty/miniz.h:1067: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 m_comment[MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE];
data/minizinc-2.5.2+dfsg1/lib/aststring.cpp:20: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(dest, src, count);
data/minizinc-2.5.2+dfsg1/lib/builtins.cpp:2580:10:  [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).
  return atoi(MZN_VERSION_MAJOR) * 10000 + atoi(MZN_VERSION_MINOR) * 1000 + atoi(MZN_VERSION_PATCH);
data/minizinc-2.5.2+dfsg1/lib/builtins.cpp:2580:44:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  return atoi(MZN_VERSION_MAJOR) * 10000 + atoi(MZN_VERSION_MINOR) * 1000 + atoi(MZN_VERSION_PATCH);
data/minizinc-2.5.2+dfsg1/lib/builtins.cpp:2580:77:  [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).
  return atoi(MZN_VERSION_MAJOR) * 10000 + atoi(MZN_VERSION_MINOR) * 1000 + atoi(MZN_VERSION_PATCH);
data/minizinc-2.5.2+dfsg1/lib/cached/parser.tab.cpp:2917: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 yymsgbuf[128];
data/minizinc-2.5.2+dfsg1/lib/cached/regex_lexer.yy.cpp:1004:30:  [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).
{ regex_yylval.iValue = std::atoi(regex_yytext); return R_INTEGER; }
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:61: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 path[PROC_PIDPATHINFO_MAXSIZE];
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:75:3:  [2] (buffer) wchar_t:
  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.
  wchar_t path[MAX_PATH];
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:90: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 path[bufsz + 1];
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:289:3:  [2] (buffer) wchar_t:
  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.
  wchar_t wd[FILENAME_MAX];
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:295: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 wd[FILENAME_MAX];
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:386:27:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
  _tmpfileDesc = mkstemps(tmpfile, ext.size());
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:388:12:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    ::free(tmpfile);
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:391:23:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
  _name = std::string(tmpfile);
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:392:10:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
  ::free(tmpfile);
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:425:15:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
  if (mkdtemp(tmpfile) == nullptr) {
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:426:12:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    ::free(tmpfile);
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:429:23:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
  _name = std::string(tmpfile);
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:430:10:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
  ::free(tmpfile);
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:619: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.
    unsigned char s_outbuf[BUF_SIZE];
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:753:21:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  int buffer_size = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, nullptr, 0);
data/minizinc-2.5.2+dfsg1/lib/file_utils.cpp:758:3:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, &result[0], buffer_size);
data/minizinc-2.5.2+dfsg1/lib/gc.cpp:58:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char data[1];
data/minizinc-2.5.2+dfsg1/lib/json_parser.cpp:93: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[1];
data/minizinc-2.5.2+dfsg1/lib/json_parser.cpp:133: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 rest[3];
data/minizinc-2.5.2+dfsg1/lib/json_parser.cpp:143: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 rest[4];
data/minizinc-2.5.2+dfsg1/lib/json_parser.cpp:153: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 rest[3];
data/minizinc-2.5.2+dfsg1/lib/parser.cpp:167: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).
          file.open(FILE_PATH(fullname), std::ios::binary);
data/minizinc-2.5.2+dfsg1/lib/parser.cpp:175: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).
            file.open(FILE_PATH(fullname), std::ios::binary);
data/minizinc-2.5.2+dfsg1/lib/solver.cpp:530:30:  [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).
      flagOverallTimeLimit = atoi(argv[i].c_str());
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:29:18:  [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.
typedef unsigned char mz_validate_uint16[sizeof(mz_uint16) == 2 ? 1 : -1];
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:30:18:  [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.
typedef unsigned char mz_validate_uint32[sizeof(mz_uint32) == 4 ? 1 : -1];
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:31:18:  [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.
typedef unsigned char mz_validate_uint64[sizeof(mz_uint64) == 8 ? 1 : -1];
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:460: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(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:485: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(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:961: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(code_sizes_to_pack, &d->m_huff_code_sizes[0][0], num_lit_codes);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:962: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(code_sizes_to_pack + num_lit_codes, &d->m_huff_code_sizes[1][0], num_dist_codes);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:1324: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((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf, bytes_to_copy);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:1346: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(&ret, p, sizeof(mz_uint16));
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:1352: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(&ret, p, sizeof(mz_uint16));
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:1476: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(d->m_dict + dst_pos, d->m_pSrc, n);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:1478: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(d->m_dict + TDEFL_LZ_DICT_SIZE + dst_pos, d->m_pSrc, MZ_MIN(n, (TDEFL_MAX_MATCH_LEN - 1) - dst_pos));
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:1826: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((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf + d->m_output_flush_ofs, n);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:1998: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((mz_uint8 *)p->m_pBuf + p->m_size, pBuf, len);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:2122: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(out_buf.m_pBuf, pnghdr, 41);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:2200:31:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define TINFL_MEMCPY(d, s, l) memcpy(d, s, l)
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:2972: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).
#define MZ_FOPEN(f, m) fopen(f, m)
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:2987: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).
#define MZ_FOPEN(f, m) fopen(f, m)
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:3017: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).
#define MZ_FOPEN(f, m) fopen(f, m)
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:3034: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).
#define MZ_FOPEN(f, m) fopen(f, m)
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:3252: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((mz_uint8 *)pArray->m_p + orig_size * pArray->m_element_size, pElements, n * pArray->m_element_size);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:3795: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(pBuf, (const mz_uint8 *)pZip->m_pState->m_pMem + file_ofs, s);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:4068: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(pStat->m_filename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:4074: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(pStat->m_comment, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS), n);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:4878: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( pvBuf, pState->pRead_buf, copied_to_caller );
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:4950: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( (uint8_t*)pvBuf + copied_to_caller, pWrite_buf_cur, to_copy );
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:5503: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((mz_uint8 *)pState->m_pMem + file_ofs, pBuf, n);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:5690:9:  [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[4096];
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:5995: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 buf[4096];
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:6983: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_central_header, pSrc_central_header, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:7533: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(pFilename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n);
data/minizinc-2.5.2+dfsg1/mzn2doc.cpp:102:27:  [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).
        toplevel_groups = atoi(argv[i]);
data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_cplex_wrap.cpp:497: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 def[CPX_STR_PARAM_MAX];
data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_cplex_wrap.cpp:604: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(_cplexBuffer, "[NO ERROR STRING GIVEN]");
data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_gurobi_wrap.cpp:496: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 current_value[GRB_MAX_STRLEN];
data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_gurobi_wrap.cpp:497: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 default_value[GRB_MAX_STRLEN];
data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_xpress_wrap.cpp:139:9:  [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 message[512];
data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_xpress_wrap.cpp:147: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 message[512];
data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_xpress_wrap.cpp:165: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 v[16];
data/minizinc-2.5.2+dfsg1/solvers/geas/geas_solverinstance.cpp:728:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int nodes = atoi(argv[i].c_str());
data/minizinc-2.5.2+dfsg1/solvers/geas/geas_solverinstance.cpp:738: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 n = atoi(argv[i].c_str());
data/minizinc-2.5.2+dfsg1/solvers/geas/geas_solverinstance.cpp:746:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int limit = atoi(argv[i].c_str());
data/minizinc-2.5.2+dfsg1/solvers/geas/geas_solverinstance.cpp:756: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 time = atoi(argv[i].c_str());
data/minizinc-2.5.2+dfsg1/solvers/gecode/gecode_solverinstance.cpp:73:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int passes = atoi(argv[i].c_str());
data/minizinc-2.5.2+dfsg1/solvers/gecode/gecode_solverinstance.cpp:83: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 n = atoi(argv[i].c_str());
data/minizinc-2.5.2+dfsg1/solvers/gecode/gecode_solverinstance.cpp:91:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int nodes = atoi(argv[i].c_str());
data/minizinc-2.5.2+dfsg1/solvers/gecode/gecode_solverinstance.cpp:99:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int c_d = atoi(argv[i].c_str());
data/minizinc-2.5.2+dfsg1/solvers/gecode/gecode_solverinstance.cpp:107:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int a_d = atoi(argv[i].c_str());
data/minizinc-2.5.2+dfsg1/solvers/gecode/gecode_solverinstance.cpp:115:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int fails = atoi(argv[i].c_str());
data/minizinc-2.5.2+dfsg1/solvers/gecode/gecode_solverinstance.cpp:123: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 time = atoi(argv[i].c_str());
data/minizinc-2.5.2+dfsg1/include/minizinc/_thirdparty/b64/decode.h:42:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      istream_in.read((char*)code, N);
data/minizinc-2.5.2+dfsg1/include/minizinc/_thirdparty/b64/encode.h:44:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      istream_in.read(plaintext, N);
data/minizinc-2.5.2+dfsg1/include/minizinc/ast.hpp:14:25:  [1] (buffer) equal:
  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.
inline bool Expression::equal(const Expression* e0, const Expression* e1) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:428:36:  [1] (buffer) equal:
  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 (v.size() >= 4 && Expression::equal(v[0], v[1]) && Expression::equal(v[1], v[2]) &&
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:428:69:  [1] (buffer) equal:
  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 (v.size() >= 4 && Expression::equal(v[0], v[1]) && Expression::equal(v[1], v[2]) &&
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:429:19:  [1] (buffer) equal:
  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.
      Expression::equal(v[2], v[3])) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:433:40:  [1] (buffer) equal:
  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.
    while (k < v.size() && Expression::equal(v[k], v[0])) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1268:26:  [1] (buffer) equal:
  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.
          return Ranges::equal(r0, r1);
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1276:26:  [1] (buffer) equal:
  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.
          return Ranges::equal(r0, r1);
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1287:26:  [1] (buffer) equal:
  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 (!Expression::equal(s0->v()[i], s1->v()[i])) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1323:26:  [1] (buffer) equal:
  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 (!Expression::equal((*a0)[i], (*a1)[i])) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1332:24:  [1] (buffer) equal:
  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 (!Expression::equal(a0->v(), a1->v())) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1339:26:  [1] (buffer) equal:
  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 (!Expression::equal(a0->idx()[i], a1->idx()[i])) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1351:24:  [1] (buffer) equal:
  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 (!Expression::equal(c0->_e, c1->_e)) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1358:26:  [1] (buffer) equal:
  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 (!Expression::equal(c0->_g[i], c1->_g[i])) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1376:26:  [1] (buffer) equal:
  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 (!Expression::equal(i0->_eIfThen[i], i1->_eIfThen[i])) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1380:26:  [1] (buffer) equal:
  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.
      return Expression::equal(i0->elseExpr(), i1->elseExpr());
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1388:24:  [1] (buffer) equal:
  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 (!Expression::equal(b0->lhs(), b1->lhs())) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1391:24:  [1] (buffer) equal:
  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 (!Expression::equal(b0->rhs(), b1->rhs())) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1402:24:  [1] (buffer) equal:
  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 (!Expression::equal(b0->e(), b1->e())) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1420:26:  [1] (buffer) equal:
  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 (!Expression::equal(c0->arg(i), c1->arg(i))) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1429:24:  [1] (buffer) equal:
  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 (!Expression::equal(v0->ti(), v1->ti())) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1432:24:  [1] (buffer) equal:
  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 (!Expression::equal(v0->id(), v1->id())) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1435:24:  [1] (buffer) equal:
  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 (!Expression::equal(v0->e(), v1->e())) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1443:24:  [1] (buffer) equal:
  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 (!Expression::equal(l0->in(), l1->in())) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1450:26:  [1] (buffer) equal:
  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 (!Expression::equal(l0->let()[i], l1->let()[i])) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1463:26:  [1] (buffer) equal:
  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 (!Expression::equal(t0->ranges()[i], t1->ranges()[i])) {
data/minizinc-2.5.2+dfsg1/lib/ast.cpp:1467:26:  [1] (buffer) equal:
  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.
      return Expression::equal(t0->domain(), t1->domain());
data/minizinc-2.5.2+dfsg1/lib/builtins.cpp:778:18:  [1] (buffer) equal:
  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 (!index0->equal(index1)) {
data/minizinc-2.5.2+dfsg1/lib/cached/lexer.yy.cpp:1341:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
data/minizinc-2.5.2+dfsg1/lib/cached/lexer.yy.cpp:2123:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    yylval->sValue[strlen(yytext)-2] = 0;
data/minizinc-2.5.2+dfsg1/lib/cached/lexer.yy.cpp:2308:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    yylval->sValue[strlen(yytext)-2] = 0; 
data/minizinc-2.5.2+dfsg1/lib/cached/lexer.yy.cpp:3096: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 yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
data/minizinc-2.5.2+dfsg1/lib/cached/parser.tab.cpp:2601:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#  define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
data/minizinc-2.5.2+dfsg1/lib/cached/regex_lexer.yy.cpp:834:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
data/minizinc-2.5.2+dfsg1/lib/cached/regex_lexer.yy.cpp:1830: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 yy_scan_bytes( yystr, (int) strlen(yystr) );
data/minizinc-2.5.2+dfsg1/lib/eval_par.cpp:1209:32:  [1] (buffer) equal:
  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.
                return Ranges::equal(ir0, ir1);
data/minizinc-2.5.2+dfsg1/lib/eval_par.cpp:1211:33:  [1] (buffer) equal:
  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.
                return !Ranges::equal(ir0, ir1);
data/minizinc-2.5.2+dfsg1/lib/eval_par.cpp:1247:30:  [1] (buffer) equal:
  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.
          return Expression::equal(lhs, rhs);
data/minizinc-2.5.2+dfsg1/lib/eval_par.cpp:1256:32:  [1] (buffer) equal:
  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 (!Expression::equal(eval_par(env, (*al0)[i]), eval_par(env, (*al1)[i]))) {
data/minizinc-2.5.2+dfsg1/lib/eval_par.cpp:2037:53:  [1] (buffer) equal:
  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 (c->id() == "deopt" && Expression::equal(c->arg(0), constants().absent)) {
data/minizinc-2.5.2+dfsg1/lib/flatten.cpp:1508:22:  [1] (buffer) equal:
  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 (!isv0->equal(isv1)) {
data/minizinc-2.5.2+dfsg1/lib/flatten.cpp:2012:36:  [1] (buffer) equal:
  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 (!Ranges::equal(vdi_domr2, newdomr)) {
data/minizinc-2.5.2+dfsg1/lib/flatten.cpp:2059:36:  [1] (buffer) equal:
  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 (!Ranges::equal(vdi_domr2, newdomr)) {
data/minizinc-2.5.2+dfsg1/lib/flatten.cpp:2244:27:  [1] (buffer) equal:
  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 (Ranges::equal(dr_eq, newfbv_eq)) {
data/minizinc-2.5.2+dfsg1/lib/flatten.cpp:3082:33:  [1] (buffer) equal:
  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.
                    Expression::equal(vdi->e()->ti()->domain(), constants().literalTrue)) {
data/minizinc-2.5.2+dfsg1/lib/flatten.cpp:3226:42:  [1] (buffer) equal:
  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.
                             Expression::equal(vd->ti()->domain(), constants().literalTrue);
data/minizinc-2.5.2+dfsg1/lib/flatten.cpp:3318:47:  [1] (buffer) equal:
  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.
                bool isFalseVar = Expression::equal(vd->ti()->domain(), constants().literalFalse);
data/minizinc-2.5.2+dfsg1/lib/flatten.cpp:3675:21:  [1] (buffer) equal:
  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 (Expression::equal(vd->ti()->domain(), constants().literalTrue)) {
data/minizinc-2.5.2+dfsg1/lib/flatten.cpp:3793:23:  [1] (buffer) equal:
  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 (Expression::equal(vd->ti()->domain(), constants().literalFalse)) {
data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_call.cpp:74:21:  [1] (buffer) equal:
  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 (Expression::equal(i(), j())) {
data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_call.cpp:89:22:  [1] (buffer) equal:
  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 (!Expression::equal(x[i](), prev)) {
data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_call.cpp:220:58:  [1] (buffer) equal:
  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.
    al_same_as_before = al_same_as_before && Expression::equal(alv_e[i], (*al)[i]);
data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_call.cpp:710:31:  [1] (buffer) equal:
  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.
                  Expression::equal(eq_call->arg(1), constants().literalFalse)) {
data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_call.cpp:713:38:  [1] (buffer) equal:
  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.
                         Expression::equal(eq_call->arg(0), constants().literalFalse)) {
data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_call.cpp:716:38:  [1] (buffer) equal:
  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.
                         Expression::equal(eq_call->arg(1), constants().literalTrue)) {
data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_call.cpp:719:38:  [1] (buffer) equal:
  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.
                         Expression::equal(eq_call->arg(0), constants().literalTrue)) {
data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_call.cpp:755:31:  [1] (buffer) equal:
  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.
                  Expression::equal(eq_call->arg(1), constants().literalFalse)) {
data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_call.cpp:758:38:  [1] (buffer) equal:
  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.
                         Expression::equal(eq_call->arg(0), constants().literalFalse)) {
data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_call.cpp:761:38:  [1] (buffer) equal:
  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.
                         Expression::equal(eq_call->arg(1), constants().literalTrue)) {
data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_call.cpp:764:38:  [1] (buffer) equal:
  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.
                         Expression::equal(eq_call->arg(0), constants().literalTrue)) {
data/minizinc-2.5.2+dfsg1/lib/flatten/flatten_id.cpp:96:30:  [1] (buffer) equal:
  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 (!Expression::equal(rete, vd->ti()->domain())) {
data/minizinc-2.5.2+dfsg1/lib/json_parser.cpp:97:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    is.read(buf, sizeof(buf));
data/minizinc-2.5.2+dfsg1/lib/json_parser.cpp:134:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            is.read(rest, sizeof(rest));
data/minizinc-2.5.2+dfsg1/lib/json_parser.cpp:144:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            is.read(rest, sizeof(rest));
data/minizinc-2.5.2+dfsg1/lib/json_parser.cpp:154:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            is.read(rest, sizeof(rest));
data/minizinc-2.5.2+dfsg1/lib/optimize.cpp:165:53:  [1] (buffer) equal:
  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 (id0->decl()->e() != nullptr && !Expression::equal(id0->decl()->e(), id1->decl()->id())) {
data/minizinc-2.5.2+dfsg1/lib/optimize.cpp:179:21:  [1] (buffer) equal:
  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 (Expression::equal(id1->decl()->e(), id0->decl()->id())) {
data/minizinc-2.5.2+dfsg1/lib/optimize.cpp:225:31:  [1] (buffer) equal:
  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.
          } else if (!Ranges::equal(nd_r, isv1r_2)) {
data/minizinc-2.5.2+dfsg1/lib/optimize.cpp:229:25:  [1] (buffer) equal:
  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 (Ranges::equal(nd_r_2, isv0r_2)) {
data/minizinc-2.5.2+dfsg1/lib/optimize.cpp:360:33:  [1] (buffer) equal:
  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 (Expression::equal(defVar->arg(0), c->arg(0))) {
data/minizinc-2.5.2+dfsg1/lib/optimize.cpp:379:36:  [1] (buffer) equal:
  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.
                       Expression::equal(c->arg(2), IntLit::a(0))) {
data/minizinc-2.5.2+dfsg1/lib/optimize.cpp:391:37:  [1] (buffer) equal:
  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 (Expression::equal(defVar->arg(0), (*al_x)[0])) {
data/minizinc-2.5.2+dfsg1/lib/optimize.cpp:1067:27:  [1] (buffer) equal:
  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 (Expression::equal(defVar->arg(0), c->arg(0))) {
data/minizinc-2.5.2+dfsg1/lib/optimize.cpp:1081:37:  [1] (buffer) equal:
  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.
        bool is_equal = Expression::equal(e0, e1);
data/minizinc-2.5.2+dfsg1/lib/optimize.cpp:1478:25:  [1] (buffer) equal:
  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 (Expression::equal(definedVarCall->arg(0), vd->id())) {
data/minizinc-2.5.2+dfsg1/lib/parser.cpp:42:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    in.read(&contents[0], contents.size());
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:4192:43:  [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).
    const mz_uint filename_len = (mz_uint)strlen(pFilename);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:4254: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).
    name_len = strlen(pName);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:4258: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).
    comment_len = pComment ? strlen(pComment) : 0;
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:5164:38:  [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 (local_header_filename_len != strlen(file_stat.m_filename))
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:6087: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).
    archive_name_size = strlen(pArchive_name);
data/minizinc-2.5.2+dfsg1/lib/thirdparty/miniz.c:6357: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).
    archive_name_size = strlen(pArchive_name);
data/minizinc-2.5.2+dfsg1/lib/typecheck.cpp:2281:28:  [1] (buffer) equal:
  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 (!Expression::equal(next_call->arg(i), fi->params()[i]->id())) {
data/minizinc-2.5.2+dfsg1/solvers/MIP/MIP_scip_wrap.cpp:344:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            for (int i = 0; i < strlen(allowed_values); i++) {

ANALYSIS SUMMARY:

Hits = 180
Lines analyzed = 79359 in approximately 2.23 seconds (35568 lines/second)
Physical Source Lines of Code (SLOC) = 66994
Hits@level = [0]  14 [1]  85 [2]  82 [3]  10 [4]   2 [5]   1
Hits@level+ = [0+] 194 [1+] 180 [2+]  95 [3+]  13 [4+]   3 [5+]   1
Hits/KSLOC@level+ = [0+] 2.89578 [1+] 2.68681 [2+] 1.41804 [3+] 0.194047 [4+] 0.0447801 [5+] 0.0149267
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.