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/ganv-1.6.0/ganv/Box.hpp
Examining data/ganv-1.6.0/ganv/Canvas.hpp
Examining data/ganv-1.6.0/ganv/Circle.hpp
Examining data/ganv-1.6.0/ganv/Edge.hpp
Examining data/ganv-1.6.0/ganv/Item.hpp
Examining data/ganv-1.6.0/ganv/Module.hpp
Examining data/ganv-1.6.0/ganv/Node.hpp
Examining data/ganv-1.6.0/ganv/Port.hpp
Examining data/ganv-1.6.0/ganv/box.h
Examining data/ganv-1.6.0/ganv/canvas.h
Examining data/ganv-1.6.0/ganv/circle.h
Examining data/ganv-1.6.0/ganv/edge.h
Examining data/ganv-1.6.0/ganv/ganv.h
Examining data/ganv-1.6.0/ganv/ganv.hpp
Examining data/ganv-1.6.0/ganv/group.h
Examining data/ganv-1.6.0/ganv/item.h
Examining data/ganv-1.6.0/ganv/module.h
Examining data/ganv-1.6.0/ganv/node.h
Examining data/ganv-1.6.0/ganv/port.h
Examining data/ganv-1.6.0/ganv/text.h
Examining data/ganv-1.6.0/ganv/types.h
Examining data/ganv-1.6.0/ganv/types.hpp
Examining data/ganv-1.6.0/ganv/widget.h
Examining data/ganv-1.6.0/ganv/wrap.hpp
Examining data/ganv-1.6.0/src/Canvas.cpp
Examining data/ganv-1.6.0/src/Port.cpp
Examining data/ganv-1.6.0/src/boilerplate.h
Examining data/ganv-1.6.0/src/box.c
Examining data/ganv-1.6.0/src/circle.c
Examining data/ganv-1.6.0/src/color.h
Examining data/ganv-1.6.0/src/edge.c
Examining data/ganv-1.6.0/src/fdgl.hpp
Examining data/ganv-1.6.0/src/ganv-private.h
Examining data/ganv-1.6.0/src/ganv_bench.cpp
Examining data/ganv-1.6.0/src/ganv_test.c
Examining data/ganv-1.6.0/src/gettext.h
Examining data/ganv-1.6.0/src/group.c
Examining data/ganv-1.6.0/src/item.c
Examining data/ganv-1.6.0/src/module.c
Examining data/ganv-1.6.0/src/node.c
Examining data/ganv-1.6.0/src/port.c
Examining data/ganv-1.6.0/src/text.c
Examining data/ganv-1.6.0/src/widget.c

FINAL RESULTS:

data/ganv-1.6.0/src/ganv_bench.cpp:137:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand(time(NULL));
data/ganv-1.6.0/src/Canvas.cpp:767: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* tmp = fopen("/dev/null", "w");
data/ganv-1.6.0/src/Canvas.cpp:772: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* fd = fopen(filename.c_str(), "w");
data/ganv-1.6.0/src/ganv_bench.cpp:38: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 name[8];
data/ganv-1.6.0/src/ganv_bench.cpp:69: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 name[8];
data/ganv-1.6.0/src/ganv_bench.cpp:126:23:  [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).
	const int canvas_w = atoi(argv[arg++]);
data/ganv-1.6.0/src/ganv_bench.cpp:127:23:  [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).
	const int canvas_h = atoi(argv[arg++]);
data/ganv-1.6.0/src/ganv_bench.cpp:133: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).
	const int n_modules = atoi(argv[arg++]);
data/ganv-1.6.0/src/ganv_bench.cpp:134: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).
	const int n_circles = atoi(argv[arg++]);
data/ganv-1.6.0/src/ganv_bench.cpp:135: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).
	const int n_edges   = atoi(argv[arg++]);
data/ganv-1.6.0/src/module.c:852: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(copy, impl->ports->pdata, sizeof(GanvPort*) * len);

ANALYSIS SUMMARY:

Hits = 11
Lines analyzed = 14245 in approximately 0.40 seconds (35868 lines/second)
Physical Source Lines of Code (SLOC) = 10184
Hits@level = [0]   8 [1]   0 [2]  10 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]  19 [1+]  11 [2+]  11 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 1.86567 [1+] 1.08013 [2+] 1.08013 [3+] 0.0981932 [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.