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/hkl-5.0.0.2661/hkl.h
Examining data/hkl-5.0.0.2661/tests/runtests.c
Examining data/hkl-5.0.0.2661/tests/hkl-unit-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-pseudoaxis-soleil-nanoscopium-robot-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-pseudoaxis-e4ch-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-pseudoaxis-zaxis-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-sample-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-axis-t.c
Examining data/hkl-5.0.0.2661/tests/tap/hkl-tap.h
Examining data/hkl-5.0.0.2661/tests/tap/basic.h
Examining data/hkl-5.0.0.2661/tests/tap/float.h
Examining data/hkl-5.0.0.2661/tests/tap/float.c
Examining data/hkl-5.0.0.2661/tests/tap/hkl-tap.c
Examining data/hkl-5.0.0.2661/tests/tap/basic.c
Examining data/hkl-5.0.0.2661/tests/tap/macros.h
Examining data/hkl-5.0.0.2661/tests/hkl-vector-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-pseudoaxis-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-detector-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-pseudoaxis-e4cv-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-quaternion-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-source-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-pseudoaxis-soleil-sirius-kappa-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-geometry-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-interval-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-bench-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-pseudoaxis-k6c-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-pseudoaxis-soleil-sixs-med-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-lattice-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-pseudoaxis-k4cv-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-parameter-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-matrix-t.c
Examining data/hkl-5.0.0.2661/tests/hkl-pseudoaxis-e6c-t.c
Examining data/hkl-5.0.0.2661/tests/hkl3d-test-t.c
Examining data/hkl-5.0.0.2661/binoculars/hkl-binoculars.c
Examining data/hkl-5.0.0.2661/binoculars/hkl-binoculars.h
Examining data/hkl-5.0.0.2661/gui/hkl-gui-pseudoaxes.c
Examining data/hkl-5.0.0.2661/gui/hkl-gui-3d-gl.h
Examining data/hkl-5.0.0.2661/gui/hkl-gui-3d.c
Examining data/hkl-5.0.0.2661/gui/hkl-gui-macros.h
Examining data/hkl-5.0.0.2661/gui/hkl-gui-3d-gl.c
Examining data/hkl-5.0.0.2661/gui/hkl-gui-3d.h
Examining data/hkl-5.0.0.2661/gui/hkl-gui.h
Examining data/hkl-5.0.0.2661/gui/hkl-gui-pseudoaxes.h
Examining data/hkl-5.0.0.2661/gui/hkl-gui.c
Examining data/hkl-5.0.0.2661/hkl3d/hkl3d.h
Examining data/hkl-5.0.0.2661/hkl3d/hkl3d.cpp
Examining data/hkl-5.0.0.2661/Documentation/figures/sirius.c
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-auto-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-factory-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-matrix-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-detector.c
Examining data/hkl-5.0.0.2661/hkl/hkl-unit-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-trajectory-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-interval.c
Examining data/hkl-5.0.0.2661/hkl/hkl-type-builtins.c
Examining data/hkl-5.0.0.2661/hkl/hkl-parameter-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-engine-soleil-sirius-turret.c
Examining data/hkl-5.0.0.2661/hkl/hkl-engine-petra3-p23-6c.c
Examining data/hkl-5.0.0.2661/hkl/hkl-vector-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-engine-e4c.c
Examining data/hkl-5.0.0.2661/hkl/hkl-quaternion-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-engine-petra3-p23-4c.c
Examining data/hkl-5.0.0.2661/hkl/hkl-detector-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-common-q-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-common-readonly.c
Examining data/hkl-5.0.0.2661/hkl/hkl-trajectory.c
Examining data/hkl-5.0.0.2661/hkl/hkl-source-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-common-hkl.c
Examining data/hkl-5.0.0.2661/hkl/hkl-interval-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-detector-factory.c
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-common.c
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-auto.c
Examining data/hkl-5.0.0.2661/hkl/hkl-engine-soleil-sixs-med.c
Examining data/hkl-5.0.0.2661/hkl/hkl-factory.c
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-common-hkl-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-macros-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-type-builtins.h
Examining data/hkl-5.0.0.2661/hkl/hkl-parameter.c
Examining data/hkl-5.0.0.2661/hkl/hkl-vector.c
Examining data/hkl-5.0.0.2661/hkl/hkl-macros.c
Examining data/hkl-5.0.0.2661/hkl/hkl-geometry-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-engine-template.c
Examining data/hkl-5.0.0.2661/hkl/api2/hkl2.c
Examining data/hkl-5.0.0.2661/hkl/api2/hkl2.h
Examining data/hkl-5.0.0.2661/hkl/hkl-engine-e6c.c
Examining data/hkl-5.0.0.2661/hkl/hkl-axis-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-engine-petra3-p09-eh2.c
Examining data/hkl-5.0.0.2661/hkl/ccan/generator/generator.h
Examining data/hkl-5.0.0.2661/hkl/ccan/generator/generator.c
Examining data/hkl-5.0.0.2661/hkl/ccan/array_size/array_size.h
Examining data/hkl-5.0.0.2661/hkl/ccan/str/str.h
Examining data/hkl-5.0.0.2661/hkl/ccan/str/debug.c
Examining data/hkl-5.0.0.2661/hkl/ccan/str/str.c
Examining data/hkl-5.0.0.2661/hkl/ccan/str/str_debug.h
Examining data/hkl-5.0.0.2661/hkl/ccan/cppmagic/cppmagic.h
Examining data/hkl-5.0.0.2661/hkl/ccan/ptrint/ptrint.h
Examining data/hkl-5.0.0.2661/hkl/ccan/noerr/noerr.c
Examining data/hkl-5.0.0.2661/hkl/ccan/noerr/noerr.h
Examining data/hkl-5.0.0.2661/hkl/ccan/autodata/autodata.h
Examining data/hkl-5.0.0.2661/hkl/ccan/autodata/autodata.c
Examining data/hkl-5.0.0.2661/hkl/ccan/typesafe_cb/typesafe_cb.h
Examining data/hkl-5.0.0.2661/hkl/ccan/alignof/alignof.h
Examining data/hkl-5.0.0.2661/hkl/ccan/build_assert/build_assert.h
Examining data/hkl-5.0.0.2661/hkl/ccan/ccan_config.h
Examining data/hkl-5.0.0.2661/hkl/ccan/ptr_valid/ptr_valid.c
Examining data/hkl-5.0.0.2661/hkl/ccan/ptr_valid/ptr_valid.h
Examining data/hkl-5.0.0.2661/hkl/ccan/compiler/compiler.h
Examining data/hkl-5.0.0.2661/hkl/ccan/darray/darray.h
Examining data/hkl-5.0.0.2661/hkl/ccan/configurator.c
Examining data/hkl-5.0.0.2661/hkl/ccan/check_type/check_type.h
Examining data/hkl-5.0.0.2661/hkl/ccan/container_of/container_of.h
Examining data/hkl-5.0.0.2661/hkl/ccan/coroutine/coroutine.h
Examining data/hkl-5.0.0.2661/hkl/ccan/coroutine/coroutine.c
Examining data/hkl-5.0.0.2661/hkl/ccan/list/list.c
Examining data/hkl-5.0.0.2661/hkl/ccan/list/list.h
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-common-psi-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-matrix.c
Examining data/hkl-5.0.0.2661/hkl/hkl-source.c
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-common-tth-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-lattice-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis.c
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-common-eulerians.c
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-common-psi.c
Examining data/hkl-5.0.0.2661/hkl/hkl-types.c
Examining data/hkl-5.0.0.2661/hkl/hkl-binding-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-engine-zaxis.c
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-common-readonly-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-engine-k4c.c
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-common-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-axis.c
Examining data/hkl-5.0.0.2661/hkl/hkl-engine-k6c.c
Examining data/hkl-5.0.0.2661/hkl/hkl-engine-soleil-nanoscopium-robot.c
Examining data/hkl-5.0.0.2661/hkl/hkl-lattice.c
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-common-tth.c
Examining data/hkl-5.0.0.2661/hkl/hkl-quaternion.c
Examining data/hkl-5.0.0.2661/hkl/hkl-types.h
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-unit.c
Examining data/hkl-5.0.0.2661/hkl/hkl-sample.c
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-common-q.c
Examining data/hkl-5.0.0.2661/hkl/hkl-binding.c
Examining data/hkl-5.0.0.2661/hkl/hkl-engine-2c.c
Examining data/hkl-5.0.0.2661/hkl/hkl-geometry.c
Examining data/hkl-5.0.0.2661/hkl/hkl-sample-private.h
Examining data/hkl-5.0.0.2661/hkl/hkl-engine-petra3-p08-lisa.c
Examining data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-common-eulerians-private.h
Examining data/hkl-5.0.0.2661/contrib/petra3/hkl_calculations.c
Examining data/hkl-5.0.0.2661/contrib/sixs/hkl3d.c

FINAL RESULTS:

data/hkl-5.0.0.2661/gui/hkl-gui-macros.h:40:8:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	(0 == access(filename, R_OK)) ? filename :			\
data/hkl-5.0.0.2661/gui/hkl-gui-macros.h:41:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	((0 == access("../data/" filename, R_OK)) ? "../data/" filename : \
data/hkl-5.0.0.2661/gui/hkl-gui-macros.h:42:10:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	 ((0 == access(PKGDATA "/hkl3d/" filename, R_OK)) ? PKGDATA "/hkl3d/" filename : NULL))
data/hkl-5.0.0.2661/gui/hkl-gui-macros.h:46:11:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (0 == access(filename, R_OK))
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:43:9:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
#define popen _popen
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:507:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, ap);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:519:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, ap);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:586:11:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	cmdout = popen(cmdredir, "r");
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:610:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(ret + len, argv[i]);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:615:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(ret + len, outflag);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:617:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(ret + len, files);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:723:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(newcmd, test->flags);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:732:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(newcmd, test->link);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:762:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(cmd, wrapper);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:763:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
			strcat(cmd, " ." DIR_SEP OUTPUT_FILE);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:893:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(value + n, buf);
data/hkl-5.0.0.2661/hkl/hkl-macros.c:48:8:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	len = vsnprintf(*strp, 0, fmt, ap);
data/hkl-5.0.0.2661/hkl/hkl-macros.c:50:2:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	vsnprintf(buffer, len-1, fmt, ap);
data/hkl-5.0.0.2661/hkl/hkl-parameter-private.h:87:26:  [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.
	void                  (*fprintf)(FILE *f, const HklParameter *self);
data/hkl-5.0.0.2661/tests/hkl3d-test-t.c:91:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
			strcat(buffer, name);
data/hkl-5.0.0.2661/tests/runtests.c:284:54:  [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.
__attribute__((__nonnull__, __noreturn__, __format__(printf, 1, 2)));
data/hkl-5.0.0.2661/tests/runtests.c:308:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, format, args);
data/hkl-5.0.0.2661/tests/runtests.c:544:7:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		if (execl(path, path, (char *) 0) == -1)
data/hkl-5.0.0.2661/tests/runtests.c:1150:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(path, X_OK) < 0)
data/hkl-5.0.0.2661/tests/runtests.c:1462:6:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	if (execl(path, path, (char *) 0) == -1)
data/hkl-5.0.0.2661/tests/runtests.c:1494:4:  [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(usage_message, program, program, program, usage_extra);
data/hkl-5.0.0.2661/tests/runtests.c:1515: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, usage_message, program, program, program, usage_extra);
data/hkl-5.0.0.2661/tests/runtests.c:1547: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(banner, shortlist);
data/hkl-5.0.0.2661/tests/tap/basic.c:134:4:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			vprintf(format, args);		\
data/hkl-5.0.0.2661/tests/tap/basic.c:431:3:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vprintf(format, args);
data/hkl-5.0.0.2661/tests/tap/basic.c:587:2:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vprintf(format, args);
data/hkl-5.0.0.2661/tests/tap/basic.c:609:2:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vprintf(format, args);
data/hkl-5.0.0.2661/tests/tap/basic.c:630:2:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vprintf(format, args);
data/hkl-5.0.0.2661/tests/tap/basic.c:652:2:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vprintf(format, args);
data/hkl-5.0.0.2661/tests/tap/basic.c:841:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if (access(path, R_OK) == 0)
data/hkl-5.0.0.2661/tests/tap/basic.c:882:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(path, X_OK) < 0)
data/hkl-5.0.0.2661/tests/tap/basic.h:66:42:  [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.
	__attribute__((__noreturn__, __format__(printf, 1, 2)));
data/hkl-5.0.0.2661/tests/tap/basic.h:75:28:  [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.
	__attribute__((__format__(printf, 2, 3)));
data/hkl-5.0.0.2661/tests/tap/basic.h:77:28:  [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.
	__attribute__((__format__(printf, 2, 0)));
data/hkl-5.0.0.2661/tests/tap/basic.h:79:28:  [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.
	__attribute__((__format__(printf, 1, 2)));
data/hkl-5.0.0.2661/tests/tap/basic.h:86:28:  [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.
	__attribute__((__format__(printf, 3, 4)));
data/hkl-5.0.0.2661/tests/tap/basic.h:88:28:  [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.
	__attribute__((__format__(printf, 2, 3)));
data/hkl-5.0.0.2661/tests/tap/basic.h:95:28:  [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.
	__attribute__((__format__(printf, 3, 4)));
data/hkl-5.0.0.2661/tests/tap/basic.h:97:28:  [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.
	__attribute__((__format__(printf, 3, 4)));
data/hkl-5.0.0.2661/tests/tap/basic.h:99:28:  [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.
	__attribute__((__format__(printf, 3, 4)));
data/hkl-5.0.0.2661/tests/tap/basic.h:103: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.
	__attribute__((__noreturn__, __nonnull__, __format__(printf, 1, 2)));
data/hkl-5.0.0.2661/tests/tap/basic.h:105: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.
	__attribute__((__noreturn__, __nonnull__, __format__(printf, 1, 2)));
data/hkl-5.0.0.2661/tests/tap/basic.h:109:41:  [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.
	__attribute__((__nonnull__, __format__(printf, 1, 2)));
data/hkl-5.0.0.2661/tests/tap/basic.h:111:41:  [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.
	__attribute__((__nonnull__, __format__(printf, 1, 2)));
data/hkl-5.0.0.2661/tests/tap/float.h:38:28:  [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.
	__attribute__((__format__(printf, 4, 5)));
data/hkl-5.0.0.2661/tests/tap/hkl-tap.h:42:28:  [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.
	__attribute__((__format__(printf, 3, 4)));
data/hkl-5.0.0.2661/tests/tap/hkl-tap.h:45:28:  [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.
	__attribute__((__format__(printf, 3, 4)));
data/hkl-5.0.0.2661/tests/runtests.c:1488:19:  [3] (buffer) getopt:
  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 ((option = getopt(argc, argv, "b:hl:os:v")) != EOF) {
data/hkl-5.0.0.2661/tests/runtests.c:1523:6:  [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("C_TAP_VERBOSE") != NULL)
data/hkl-5.0.0.2661/tests/tap/basic.c:837:10:  [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.
		base = getenv(envs[i]);
data/hkl-5.0.0.2661/tests/tap/basic.c:878:10:  [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.
	build = getenv("BUILD");
data/hkl-5.0.0.2661/Documentation/figures/sirius.c:43:12:  [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 *f = fopen(filename, "w+");
data/hkl-5.0.0.2661/Documentation/figures/sirius.c:123:12:  [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 *f = fopen(filename, "w+");
data/hkl-5.0.0.2661/binoculars/hkl-binoculars.c:451: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(self->photons, src->photons, n * sizeof(*self->photons));
data/hkl-5.0.0.2661/binoculars/hkl-binoculars.c:452: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(self->contributions, src->contributions, n * sizeof(*self->contributions));
data/hkl-5.0.0.2661/hkl/ccan/autodata/autodata.c:63:38:  [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.
		if (!ptr_valid_batch_read(&batch, (char *)adata[2]))
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:541: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 buffer[BUFSIZ];
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:583: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(cmdredir, cmd, cmdlen);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:584: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(cmdredir + cmdlen, redir, sizeof(redir));
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:683:9:  [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).
	outf = fopen(INPUT_FILE, verbose > 1 ? "w+" : "w");
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:791: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 buf[1000];
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:858: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 buf[1000];
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:994: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(tests, base_tests, sizeof(base_tests));
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:1023:11:  [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).
			vars = fopen(varfile, "a");
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:1040:10:  [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).
		outf = fopen(headerfile, "w");
data/hkl-5.0.0.2661/hkl/ccan/darray/darray.h: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((arr).item + oldSize_, items, count_ * sizeof(*(arr).item)); \
data/hkl-5.0.0.2661/hkl/ccan/darray/darray.h:194: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((arr).item, items, count_ * sizeof(*(arr).item)); \
data/hkl-5.0.0.2661/hkl/ccan/darray/darray.h:200: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((arr).item + oldSize_, items, count_ * sizeof(*(arr).item)); \
data/hkl-5.0.0.2661/hkl/ccan/darray/darray.h:208: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((arr).item, items, count_ * sizeof(*(arr).item)); \
data/hkl-5.0.0.2661/hkl/ccan/darray/darray.h:243:103:  [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 darray_from_items(arr, items, count) do {size_t count_ = (count); darray_resize(arr, count_); memcpy((arr).item, items, count_*sizeof(*(arr).item));} while(0)
data/hkl-5.0.0.2661/hkl/ccan/ptr_valid/ptr_valid.c:20:7:  [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).
	fd = open(filename, O_RDONLY);
data/hkl-5.0.0.2661/hkl/hkl-matrix.c:98: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(dup, self, sizeof(*self));
data/hkl-5.0.0.2661/hkl/hkl-matrix.c:153: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(self->data, m->data, sizeof(double) * 9);
data/hkl-5.0.0.2661/hkl/hkl-pseudoaxis-auto.c:143: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(x_data0, x_data, len * sizeof(double));
data/hkl-5.0.0.2661/hkl/hkl-quaternion.c:46: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(dup, self, sizeof(*self));
data/hkl-5.0.0.2661/hkl/hkl-quaternion.c:109: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(&self->data[1], &v->data[0], sizeof(v->data));
data/hkl-5.0.0.2661/hkl/hkl-vector.c:44: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(dup, self, sizeof (HklVector));
data/hkl-5.0.0.2661/hkl3d/hkl3d.cpp:606: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(self->axes[idx]->objects[k]->g3d->transformation->matrix,
data/hkl-5.0.0.2661/hkl3d/hkl3d.cpp:752:12:  [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).
	current = open(".", O_RDONLY);
data/hkl-5.0.0.2661/hkl3d/hkl3d.cpp:828:9:  [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 = fopen(filename, "rb");
data/hkl-5.0.0.2661/hkl3d/hkl3d.cpp:886:31:  [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).
			config->objects[j-1]->id = atoi((const char *)input_event.data.scalar.value);
data/hkl-5.0.0.2661/hkl3d/hkl3d.cpp:942: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 number[64];
data/hkl-5.0.0.2661/hkl3d/hkl3d.cpp:959:10:  [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 = fopen(filename, "a+");
data/hkl-5.0.0.2661/hkl3d/hkl3d.cpp:1024:4:  [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(number, "%d", self->config->models[i]->objects[j]->id);
data/hkl-5.0.0.2661/hkl3d/hkl3d.cpp:1054: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(number, "%f", self->config->models[i]->objects[j]->transformation[k]);
data/hkl-5.0.0.2661/tests/hkl-bench-t.c:194:7:  [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).
		n = atoi(argv[1]);
data/hkl-5.0.0.2661/tests/hkl-pseudoaxis-t.c:597:7:  [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).
		n = atoi(argv[1]);
data/hkl-5.0.0.2661/tests/hkl3d-test-t.c: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 buffer[1000];
data/hkl-5.0.0.2661/tests/runtests.c:389: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(p, s, len);
data/hkl-5.0.0.2661/tests/runtests.c:434: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(result + offset, string, strlen(string));
data/hkl-5.0.0.2661/tests/runtests.c:523:10:  [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).
		infd = open("/dev/null", O_RDONLY);
data/hkl-5.0.0.2661/tests/runtests.c:534:11:  [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).
		errfd = open("/dev/null", O_WRONLY);
data/hkl-5.0.0.2661/tests/runtests.c:1035: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 buffer[BUFSIZ];
data/hkl-5.0.0.2661/tests/runtests.c:1176:8:  [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.
	const char *bases[3], *suffix, *base;
data/hkl-5.0.0.2661/tests/runtests.c:1178:8:  [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.
	const char *suffixes[3] = { "-t", ".t", "" };
data/hkl-5.0.0.2661/tests/runtests.c:1216: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 buffer[BUFSIZ];
data/hkl-5.0.0.2661/tests/runtests.c:1228:9:  [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 = fopen(filename, "r");
data/hkl-5.0.0.2661/tests/tap/basic.c:177: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(result + offset, string, strlen(string));
data/hkl-5.0.0.2661/tests/tap/basic.c:669:15:  [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->file = fopen(file->name, "r");
data/hkl-5.0.0.2661/tests/tap/basic.c:792: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(p, s, len);
data/hkl-5.0.0.2661/tests/tap/basic.c:816: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, s, length);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:581:11:  [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).
	cmdlen = strlen(cmd);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:602: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(outflag) + strlen(files) + 1;
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:602: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).
	size_t len = strlen(outflag) + strlen(files) + 1;
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:605:14:  [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).
		len += 1 + strlen(argv[i]);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:611:10:  [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).
		len += strlen(argv[i]);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:616:9:  [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).
	len += strlen(outflag);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:720:28:  [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).
		newcmd = realloc(newcmd, strlen(newcmd) + strlen(" ")
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:720:45:  [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).
		newcmd = realloc(newcmd, strlen(newcmd) + strlen(" ")
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:721:7:  [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).
				+ strlen(test->flags) + 1);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:722:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(newcmd, " ");
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:729:28:  [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).
		newcmd = realloc(newcmd, strlen(newcmd) + strlen(" ")
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:729:45:  [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).
		newcmd = realloc(newcmd, strlen(newcmd) + strlen(" ")
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:730:7:  [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).
				+ strlen(test->link) + 1);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:731:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(newcmd, " ");
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:760:23:  [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 *cmd = malloc(strlen(wrapper) + strlen(" ." DIR_SEP OUTPUT_FILE) + 1);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:760:41:  [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 *cmd = malloc(strlen(wrapper) + strlen(" ." DIR_SEP OUTPUT_FILE) + 1);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:811:7:  [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 (strlen(p) && p[strlen(p)-1] == '\n')
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:811:22:  [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 (strlen(p) && p[strlen(p)-1] == '\n')
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:812:6:  [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).
			p[strlen(p)-1] = '\0';
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:885:6:  [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 (strlen(value) == 0) {
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:891:8:  [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).
			n = strlen(value);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:892:31:  [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).
			value = realloc(value, n + strlen(buf) + 1);
data/hkl-5.0.0.2661/hkl/ccan/configurator.c:894:9:  [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).
			n += strlen(buf);
data/hkl-5.0.0.2661/hkl/ccan/darray/darray.h:249:101:  [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 darray_append_string(arr, str) do {const char *str_ = (str); darray_append_items(arr, str_, strlen(str_)+1); (arr).size--;} while(0)
data/hkl-5.0.0.2661/hkl/ccan/darray/darray.h:254:49:  [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).
		darray_prepend_items_nullterminate(arr, str_, strlen(str_)); \
data/hkl-5.0.0.2661/hkl/ccan/darray/darray.h:259:97:  [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 darray_from_string(arr, str) do {const char *str_ = (str); darray_from_items(arr, str_, strlen(str_)+1); (arr).size--;} while(0)
data/hkl-5.0.0.2661/hkl/ccan/ptr_valid/ptr_valid.c:28:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((ret = read(fd, buffer + s, max - s)) > 0) {
data/hkl-5.0.0.2661/hkl/ccan/ptr_valid/ptr_valid.c:178:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (read(infd, &p, sizeof(p)) == sizeof(p)) {
data/hkl-5.0.0.2661/hkl/ccan/ptr_valid/ptr_valid.c:184:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(infd, &size, sizeof(size)) != sizeof(size))
data/hkl-5.0.0.2661/hkl/ccan/ptr_valid/ptr_valid.c:186:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(infd, &is_write, sizeof(is_write)) != sizeof(is_write))
data/hkl-5.0.0.2661/hkl/ccan/ptr_valid/ptr_valid.c:258:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(batch->from_child, &ret, sizeof(ret)) != sizeof(ret)) {
data/hkl-5.0.0.2661/hkl/ccan/str/str.c:6:23:  [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 i = 0, nlen = strlen(needle);
data/hkl-5.0.0.2661/hkl/ccan/str/str.h:32:55:  [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 strstarts(str,prefix) (strncmp((str),(prefix),strlen(prefix)) == 0)
data/hkl-5.0.0.2661/hkl/ccan/str/str.h:45:6:  [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 (strlen(str) < strlen(postfix))
data/hkl-5.0.0.2661/hkl/ccan/str/str.h:45:20:  [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 (strlen(str) < strlen(postfix))
data/hkl-5.0.0.2661/hkl/ccan/str/str.h:48:21:  [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 streq(str + strlen(str) - strlen(postfix), postfix);
data/hkl-5.0.0.2661/hkl/ccan/str/str.h:48:35:  [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 streq(str + strlen(str) - strlen(postfix), postfix);
data/hkl-5.0.0.2661/tests/hkl3d-test-t.c:79:2:  [1] (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 character.
	strcpy(buffer, "");
data/hkl-5.0.0.2661/tests/hkl3d-test-t.c:90:4:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
			strcat(buffer, " ");
data/hkl-5.0.0.2661/tests/runtests.c:384:8:  [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).
	len = strlen(s) + 1;
data/hkl-5.0.0.2661/tests/runtests.c:420:28:  [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 (length >= UINT_MAX - strlen(string)) {
data/hkl-5.0.0.2661/tests/runtests.c:424:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		length += strlen(string);
data/hkl-5.0.0.2661/tests/runtests.c:434:35:  [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).
		memcpy(result + offset, string, strlen(string));
data/hkl-5.0.0.2661/tests/runtests.c:435:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		offset += strlen(string);
data/hkl-5.0.0.2661/tests/runtests.c:665:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					ts->reason[strlen(ts->reason) - 1] = '\0';
data/hkl-5.0.0.2661/tests/runtests.c:728: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).
		bail = skip_whitespace(bail + strlen("Bail out!"));
data/hkl-5.0.0.2661/tests/runtests.c:732:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			length = strlen(bail);
data/hkl-5.0.0.2661/tests/runtests.c:748:11:  [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 (line[strlen(line) - 1] != '\n')
data/hkl-5.0.0.2661/tests/runtests.c:1234:12:  [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).
		length = strlen(buffer) - 1;
data/hkl-5.0.0.2661/tests/runtests.c:1243:7:  [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 (strlen(testname) == 0)
data/hkl-5.0.0.2661/tests/runtests.c:1340:12:  [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).
		length = strlen(current->ts->file);
data/hkl-5.0.0.2661/tests/runtests.c:1365:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			for (i = strlen(ts->file); i < longest; i++)
data/hkl-5.0.0.2661/tests/tap/basic.c:165:28:  [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 (length >= UINT_MAX - strlen(string))
data/hkl-5.0.0.2661/tests/tap/basic.c:167:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		length += strlen(string);
data/hkl-5.0.0.2661/tests/tap/basic.c:177:35:  [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).
		memcpy(result + offset, string, strlen(string));
data/hkl-5.0.0.2661/tests/tap/basic.c:178:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		offset += strlen(string);
data/hkl-5.0.0.2661/tests/tap/basic.c:232:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			length = strlen(file->buffer);
data/hkl-5.0.0.2661/tests/tap/basic.c:788:8:  [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).
	len = strlen(s) + 1;

ANALYSIS SUMMARY:

Hits = 164
Lines analyzed = 44243 in approximately 1.44 seconds (30804 lines/second)
Physical Source Lines of Code (SLOC) = 28037
Hits@level = [0] 340 [1]  58 [2]  50 [3]   4 [4]  52 [5]   0
Hits@level+ = [0+] 504 [1+] 164 [2+] 106 [3+]  56 [4+]  52 [5+]   0
Hits/KSLOC@level+ = [0+] 17.9762 [1+] 5.84941 [2+] 3.78072 [3+] 1.99736 [4+] 1.85469 [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.