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/robocut-1.0.11/Plotter.h
Examining data/robocut-1.0.11/PathPaintEngine.h
Examining data/robocut-1.0.11/NoCopy.h
Examining data/robocut-1.0.11/CuttingThread.cpp
Examining data/robocut-1.0.11/Common.h
Examining data/robocut-1.0.11/PathPaintPage.cpp
Examining data/robocut-1.0.11/ProgramOptions.cpp
Examining data/robocut-1.0.11/PathPaintEngine.cpp
Examining data/robocut-1.0.11/CuttingDialog.h
Examining data/robocut-1.0.11/CutDialog.h
Examining data/robocut-1.0.11/CutDialog.cpp
Examining data/robocut-1.0.11/MainWindow.h
Examining data/robocut-1.0.11/Common.cpp
Examining data/robocut-1.0.11/ProgramOptions.h
Examining data/robocut-1.0.11/PathPaintPage.h
Examining data/robocut-1.0.11/CuttingThread.h
Examining data/robocut-1.0.11/MainWindow.cpp
Examining data/robocut-1.0.11/Plotter.cpp
Examining data/robocut-1.0.11/CuttingDialog.cpp
Examining data/robocut-1.0.11/PathSorter.h
Examining data/robocut-1.0.11/main.cpp
Examining data/robocut-1.0.11/PathSorter.cpp

FINAL RESULTS:

data/robocut-1.0.11/Common.h:115:12:  [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* V = getenv(Var.c_str());
data/robocut-1.0.11/ProgramOptions.cpp:321:15:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		while ((c = getopt_long(argc, argv, shortopts, longopts, &option_index)) != -1)
data/robocut-1.0.11/Common.h:74:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char out[128];
data/robocut-1.0.11/Common.h:75:2:  [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(out, "%lld", I);
data/robocut-1.0.11/Plotter.cpp:104: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.
	unsigned char buffer[PacketSize];
data/robocut-1.0.11/ProgramOptions.cpp:340:14:  [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).
				setMedia(atoi(optarg));
data/robocut-1.0.11/ProgramOptions.cpp:343:14:  [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).
				setSpeed(atoi(optarg));
data/robocut-1.0.11/ProgramOptions.cpp:346: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).
				setPressure(atoi(optarg));
data/robocut-1.0.11/ProgramOptions.cpp:376:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				setVendorUSB_ID(atoi(optarg));
data/robocut-1.0.11/ProgramOptions.cpp:379: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).
				setProductUSB_ID(atoi(optarg));

ANALYSIS SUMMARY:

Hits = 10
Lines analyzed = 3344 in approximately 0.09 seconds (36644 lines/second)
Physical Source Lines of Code (SLOC) = 2274
Hits@level = [0]   0 [1]   0 [2]   8 [3]   2 [4]   0 [5]   0
Hits@level+ = [0+]  10 [1+]  10 [2+]  10 [3+]   2 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 4.39754 [1+] 4.39754 [2+] 4.39754 [3+] 0.879507 [4+]   0 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.