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/coinor-osi-0.108.6+repack1/Osi/examples/readconic.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/examples/opbdp_solve.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/examples/build.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/examples/basic.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/examples/opbdp_solve.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/examples/parameters.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/examples/query.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/test/OsiGlpkSolverInterfaceTest.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolverInterface.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolverInterfaceTest.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolverInterface.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolverInterfaceIO.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/test/unitTest.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/test/OsiXprSolverInterfaceTest.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/test/OsiCpxSolverInterfaceTest.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/test/OsiGrbSolverInterfaceTest.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/test/OsiMskSolverInterfaceTest.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/test/OsiSpxSolverInterfaceTest.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiCommonTest/OsiRowCutTest.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiCommonTest/OsiUnitTests.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiCommonTest/OsiRowCutDebuggerTest.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiCommonTest/OsiColCutTest.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiCommonTest/OsiSimplexAPITest.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiCommonTest/OsiSolverInterfaceTest.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiCommonTest/OsiNetlibTest.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiCommonTest/OsiCutsTest.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiCommonTest/OsiUnitTestUtils.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiXpr/OsiXprSolverInterface.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiXpr/OsiXprSolverInterface.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiCpx/OsiCpxSolverInterface.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiCpx/OsiCpxSolverInterface.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiGrb/OsiGrbSolverInterface.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiGrb/OsiGrbSolverInterface.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiMsk/OsiMskSolverInterface.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiMsk/OsiMskSolverInterface.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiSpx/OsiSpxSolverInterface.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiSpx/OsiSpxSolverInterface.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiGlpk/OsiGlpkSolverInterface.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/OsiGlpk/OsiGlpkSolverInterface.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiConfig.h
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiCuts.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiBranchingObject.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiCuts.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiCollections.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiChooseVariable.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiBranchingObject.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiRowCutDebugger.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverBranch.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiColCut.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiChooseVariable.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverInterface.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiRowCutDebugger.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverBranch.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiColCut.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiPresolve.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverInterface.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiNames.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiPresolve.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiAuxInfo.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/config_osi_default.h
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiAuxInfo.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiRowCut.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiRowCut.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiCut.cpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiCut.hpp
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/config_default.h
Examining data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverParameters.hpp
Examining data/coinor-osi-0.108.6+repack1/BuildTools/headers/configall_system.h
Examining data/coinor-osi-0.108.6+repack1/BuildTools/headers/configall_system_msc.h

FINAL RESULTS:

data/coinor-osi-0.108.6+repack1/Osi/src/OsiCpx/OsiCpxSolverInterface.cpp:32:22:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define debugMessage printf
data/coinor-osi-0.108.6+repack1/Osi/src/OsiCpx/OsiCpxSolverInterface.cpp:36:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  printf
data/coinor-osi-0.108.6+repack1/Osi/src/OsiCpx/OsiCpxSolverInterface.cpp:72:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(s, "%s returned error %d", cpxfuncname.c_str(), err);
data/coinor-osi-0.108.6+repack1/Osi/src/OsiCpx/OsiCpxSolverInterface.cpp:125:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    printf(msg);
data/coinor-osi-0.108.6+repack1/Osi/src/OsiCpx/OsiCpxSolverInterface.cpp:135:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    printf(msg);
data/coinor-osi-0.108.6+repack1/Osi/src/OsiCpx/OsiCpxSolverInterface.cpp:144:5:  [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.
    fprintf(stderr, msg);
data/coinor-osi-0.108.6+repack1/Osi/src/OsiGlpk/OsiGlpkSolverInterface.cpp:137:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(s, "%s returned error %d", glpkfuncname.c_str(), err);
data/coinor-osi-0.108.6+repack1/Osi/src/OsiGrb/OsiGrbSolverInterface.cpp:45:55:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define debugMessage printf("line %4d: ", __LINE__) & printf
data/coinor-osi-0.108.6+repack1/Osi/src/OsiGrb/OsiGrbSolverInterface.cpp:49:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  printf
data/coinor-osi-0.108.6+repack1/Osi/src/OsiMsk/OsiMskSolverInterface.cpp:36:22:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define debugMessage printf
data/coinor-osi-0.108.6+repack1/Osi/src/OsiMsk/OsiMskSolverInterface.cpp:128:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		printf(str);
data/coinor-osi-0.108.6+repack1/Osi/src/OsiMsk/OsiMskSolverInterface.cpp:140:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		printf(str);
data/coinor-osi-0.108.6+repack1/Osi/src/OsiMsk/OsiMskSolverInterface.cpp:151:3:  [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.
		fprintf(stderr, str);
data/coinor-osi-0.108.6+repack1/Osi/src/OsiMsk/OsiMskSolverInterface.cpp:164:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf( s, "%s returned error %d", mskfuncname, err );
data/coinor-osi-0.108.6+repack1/Osi/src/OsiXpr/OsiXprSolverInterface.cpp:2124:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(fullname, "%s.%s", filename, extension);
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiPresolve.cpp:562: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(name)) {
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiPresolve.cpp:563:20:  [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 val = atoi(getenv(name));
data/coinor-osi-0.108.6+repack1/Osi/examples/opbdp_solve.cpp:243: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 name[9];
data/coinor-osi-0.108.6+repack1/Osi/examples/opbdp_solve.cpp:244:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(name,"C%7.7d",i);
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiAuxInfo.cpp:128: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(betterSolution, bestSolution_, CoinMin(numberColumns, sizeSolution_) * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiAuxInfo.cpp:148: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(solution, bestSolution_, numberColumns * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiBranchingObject.cpp:844: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(members_, which, numberMembers_ * sizeof(int));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiBranchingObject.cpp:846: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(weights_, weights, numberMembers_ * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiBranchingObject.cpp:877: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(members_, rhs.members_, numberMembers_ * sizeof(int));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiBranchingObject.cpp:878: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(weights_, rhs.weights_, numberMembers_ * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiBranchingObject.cpp:906: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(members_, rhs.members_, numberMembers_ * sizeof(int));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiBranchingObject.cpp:907: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(weights_, rhs.weights_, numberMembers_ * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiBranchingObject.cpp:1537: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(bound_, rhs.bound_, (numberRanges_ + 1) * rangeType_ * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiBranchingObject.cpp:1565: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(bound_, rhs.bound_, (numberRanges_ + 1) * rangeType_ * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiPresolve.cpp:315: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(originalColumn_, prob.originalColumn_, ncolsNow * sizeof(int));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiPresolve.cpp:319: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(originalRow_, prob.originalRow_, nrowsNow * sizeof(int));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiPresolve.cpp:563: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 val = atoi(getenv(name));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiPresolve.cpp:1543: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(sol_, presol, ncols_ * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiPresolve.cpp:1546: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(acts_, si->getRowActivity(), nrows_ * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiRowCutDebugger.cpp:1635:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      FILE * fp = fopen("xx.xx","wb");
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverBranch.cpp:119: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(tempI + putNow, indices_ + start_[2 - base], numberNow * sizeof(int));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverBranch.cpp:120: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(tempD + putNow, bound_ + start_[2 - base], numberNow * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverBranch.cpp:121: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(tempI + putNew, whichLower, numberTighterLower * sizeof(int));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverBranch.cpp:122: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(tempD + putNew, newLower, numberTighterLower * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverBranch.cpp:124: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(tempI + putNew, whichUpper, numberTighterUpper * sizeof(int));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverBranch.cpp:125: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(tempD + putNew, newUpper, numberTighterUpper * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverBranch.cpp:181: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(tempI + putNow, indices_ + start_[2 - base], numberNow * sizeof(int));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverBranch.cpp:182: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(tempD + putNow, bound_ + start_[2 - base], numberNow * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverBranch.cpp:183: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(tempI + putNew, whichLower, numberTighterLower * sizeof(int));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverBranch.cpp:184: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(tempD + putNew, newLower, numberTighterLower * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverBranch.cpp:186: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(tempI + putNew, whichUpper, numberTighterUpper * sizeof(int));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverBranch.cpp:187: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(tempD + putNew, newUpper, numberTighterUpper * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverInterface.cpp:1287: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(objective, getObjCoefficients(), numcols * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverInterface.cpp:1339:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    colnames = new char *[getNumCols()];
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverInterface.cpp:1340:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    rownames = new char *[getNumRows() + 1];
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverInterface.cpp:1379:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    colnames = new char *[getNumCols()];
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverInterface.cpp:1380:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    rownames = new char *[getNumRows() + 1];
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverInterface.cpp:1417:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fp = fopen(filename, "w");
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiSolverInterface.cpp:1496:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *fp = fopen(filename, "r");
data/coinor-osi-0.108.6+repack1/Osi/src/OsiCommonTest/OsiSimplexAPITest.cpp:573: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(fakeCost, si->getObjCoefficients(), numberColumns * sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/src/OsiCpx/OsiCpxSolverInterface.cpp:71: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 s[100];
data/coinor-osi-0.108.6+repack1/Osi/src/OsiCpx/OsiCpxSolverInterface.cpp:1702: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 c[2] = { 'L', 'U' };
data/coinor-osi-0.108.6+repack1/Osi/src/OsiCpx/OsiCpxSolverInterface.cpp:2796: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 filetype[4] = "MPS";
data/coinor-osi-0.108.6+repack1/Osi/src/OsiGlpk/OsiGlpkSolverInterface.cpp:136: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 s[100];
data/coinor-osi-0.108.6+repack1/Osi/src/OsiGrb/OsiGrbSolverInterface.cpp:56:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char s[1001];                                                                  \
data/coinor-osi-0.108.6+repack1/Osi/src/OsiGrb/OsiGrbSolverInterface.cpp:58:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(s, "Error <%d> from GUROBI function call: ", _retcode);              \
data/coinor-osi-0.108.6+repack1/Osi/src/OsiGrb/OsiGrbSolverInterface.cpp:61:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(s, "Error <%d> from GUROBI function call (no license?).", _retcode); \
data/coinor-osi-0.108.6+repack1/Osi/src/OsiGrb/OsiGrbSolverInterface.cpp:2259: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(ind, columnIndices, num * sizeof(int));
data/coinor-osi-0.108.6+repack1/Osi/src/OsiMsk/OsiMskSolverInterface.cpp:112: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(str_, str, len-1);
data/coinor-osi-0.108.6+repack1/Osi/src/OsiMsk/OsiMskSolverInterface.cpp:163: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 s[100];
data/coinor-osi-0.108.6+repack1/Osi/src/OsiMsk/OsiMskSolverInterface.cpp:4258:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    rowSense = new char  [nrows];
data/coinor-osi-0.108.6+repack1/Osi/src/OsiMsk/OsiMskSolverInterface.cpp:4557:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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   * rowSense = new char  [numrows];
data/coinor-osi-0.108.6+repack1/Osi/src/OsiXpr/OsiXprSolverInterface.cpp:1227: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 qbtype[2] = { 'L', 'U' };
data/coinor-osi-0.108.6+repack1/Osi/src/OsiXpr/OsiXprSolverInterface.cpp:1312: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 qrtype[1] = { sense };
data/coinor-osi-0.108.6+repack1/Osi/src/OsiXpr/OsiXprSolverInterface.cpp:1709: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 probName[256];
data/coinor-osi-0.108.6+repack1/Osi/src/OsiXpr/OsiXprSolverInterface.cpp:1710:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(probName, "Prob%i", osiSerial_);
data/coinor-osi-0.108.6+repack1/Osi/src/OsiXpr/OsiXprSolverInterface.cpp:1780: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 pname[256]; // Problem names can be 200 chars in XPRESS 12
data/coinor-osi-0.108.6+repack1/Osi/src/OsiXpr/OsiXprSolverInterface.cpp:1915: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 probName[256];
data/coinor-osi-0.108.6+repack1/Osi/src/OsiXpr/OsiXprSolverInterface.cpp:1916:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(probName, "Prob%i", osiSerial_);
data/coinor-osi-0.108.6+repack1/Osi/src/OsiXpr/OsiXprSolverInterface.cpp:1982: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 pname[256]; // Problem names can be 200 chars in XPRESS 12
data/coinor-osi-0.108.6+repack1/Osi/src/OsiXpr/OsiXprSolverInterface.cpp:2097: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 pname[256];      // Problem names can be 200 chars in XPRESS 12
data/coinor-osi-0.108.6+repack1/Osi/src/OsiXpr/OsiXprSolverInterface.cpp:2154:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char longbuf[2048] = "failed to init XPRESS, maybe no license";
data/coinor-osi-0.108.6+repack1/Osi/src/OsiXpr/OsiXprSolverInterface.cpp:2226:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    logFilePtr_ = fopen(logFileName_, "a+");
data/coinor-osi-0.108.6+repack1/Osi/test/OsiGlpkSolverInterfaceTest.cpp:653: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(fakeCost,m.getObjCoefficients(),numberColumns*sizeof(double));
data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.cpp:200:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char s[100];
data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.cpp:201:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   FILE* infile = fopen(filename, "r");
data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.cpp:217: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(parm.temp_dualfile, sss.c_str(), sss.length());
data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.cpp:225:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	 parm.printflag = atoi(&s[i+1]);
data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.cpp:229:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	 parm.printinvl = atoi(&s[i+1]);
data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.cpp:233:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	 parm.maxsgriters = atoi(&s[i+1]);
data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.cpp:237:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	 parm.heurinvl = atoi(&s[i+1]);
data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.cpp:241:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	 parm.greentestinvl = atoi(&s[i+1]);
data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.cpp:245:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	 parm.yellowtestinvl = atoi(&s[i+1]);
data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.cpp:249:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	 parm.redtestinvl = atoi(&s[i+1]);
data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.cpp:269:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	 parm.alphaint = atoi(&s[i+1]);
data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.cpp:290:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	  parm.ascent_check_invl = atoi(&s[i+1]);
data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.cpp:294: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).
	  parm.minimum_rel_ascent = atoi(&s[i+1]);
data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.cpp:486:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	 FILE* outfile = fopen(parm.temp_dualfile, "w");
data/coinor-osi-0.108.6+repack1/Osi/src/Osi/OsiRowCutDebugger.cpp:267: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).
  for (i = 0; i < static_cast< int >(strlen(model)); i++) {
data/coinor-osi-0.108.6+repack1/Osi/src/OsiCommonTest/OsiUnitTests.hpp:267:10:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    std::getchar();
data/coinor-osi-0.108.6+repack1/Osi/src/OsiCommonTest/OsiUnitTests.hpp:357:9:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        getchar();                                                                      \
data/coinor-osi-0.108.6+repack1/Osi/src/OsiCpx/OsiCpxSolverInterface.cpp:100:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t len = strlen(msg);
data/coinor-osi-0.108.6+repack1/Osi/src/OsiGrb/OsiGrbSolverInterface.cpp:59:9:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
        strncat(s, GRBgeterrormsg(OsiGrbSolverInterface::globalenv_), 1000);         \
data/coinor-osi-0.108.6+repack1/Osi/src/OsiMsk/OsiMskSolverInterface.cpp:52:8:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#undef getc
data/coinor-osi-0.108.6+repack1/Osi/src/OsiMsk/OsiMskSolverInterface.cpp:105:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(str);
data/coinor-osi-0.108.6+repack1/Osi/src/OsiMsk/OsiMskSolverInterface.cpp:533:3:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  getchar();
data/coinor-osi-0.108.6+repack1/Osi/src/OsiXpr/OsiXprSolverInterface.cpp:2123: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).
  char *fullname = new char[strlen(filename) + strlen(extension) + 2];
data/coinor-osi-0.108.6+repack1/Osi/src/OsiXpr/OsiXprSolverInterface.cpp:2123:48:  [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).
  char *fullname = new char[strlen(filename) + strlen(extension) + 2];
data/coinor-osi-0.108.6+repack1/Osi/test/OsiTestSolver.cpp:207:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      const size_t len = strlen(s) - 1;

ANALYSIS SUMMARY:

Hits = 104
Lines analyzed = 61086 in approximately 1.61 seconds (37913 lines/second)
Physical Source Lines of Code (SLOC) = 40339
Hits@level = [0] 263 [1]  11 [2]  76 [3]   2 [4]  15 [5]   0
Hits@level+ = [0+] 367 [1+] 104 [2+]  93 [3+]  17 [4+]  15 [5+]   0
Hits/KSLOC@level+ = [0+] 9.0979 [1+] 2.57815 [2+] 2.30546 [3+] 0.421428 [4+] 0.371849 [5+]   0
Dot directories skipped = 2 (--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.