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/colorhug-client-0.2.8/src/ch-backlight-resources.c
Examining data/colorhug-client-0.2.8/src/ch-markdown.c
Examining data/colorhug-client-0.2.8/src/ch-cleanup.h
Examining data/colorhug-client-0.2.8/src/ch-flash-md.h
Examining data/colorhug-client-0.2.8/src/ch-graph-widget.h
Examining data/colorhug-client-0.2.8/src/ch-refresh-utils.h
Examining data/colorhug-client-0.2.8/src/ch-main.c
Examining data/colorhug-client-0.2.8/src/ch-refresh.c
Examining data/colorhug-client-0.2.8/src/ch-refresh-utils.c
Examining data/colorhug-client-0.2.8/src/ch-flash.c
Examining data/colorhug-client-0.2.8/src/ch-backlight-resources.h
Examining data/colorhug-client-0.2.8/src/ch-ambient.h
Examining data/colorhug-client-0.2.8/src/ch-point-obj.c
Examining data/colorhug-client-0.2.8/src/ch-flash-md.c
Examining data/colorhug-client-0.2.8/src/ch-backlight.c
Examining data/colorhug-client-0.2.8/src/ch-self-test.c
Examining data/colorhug-client-0.2.8/src/ch-refresh-resources.h
Examining data/colorhug-client-0.2.8/src/ch-point-obj.h
Examining data/colorhug-client-0.2.8/src/ch-markdown.h
Examining data/colorhug-client-0.2.8/src/ch-refresh-resources.c
Examining data/colorhug-client-0.2.8/src/ch-graph-widget.c
Examining data/colorhug-client-0.2.8/src/ch-ccmx-resources.c
Examining data/colorhug-client-0.2.8/src/ch-ccmx-resources.h
Examining data/colorhug-client-0.2.8/src/ch-flash-resources.c
Examining data/colorhug-client-0.2.8/src/ch-ccmx.c
Examining data/colorhug-client-0.2.8/src/ch-ambient.c
Examining data/colorhug-client-0.2.8/src/ch-flash-resources.h
Examining data/colorhug-client-0.2.8/config.h

FINAL RESULTS:

data/colorhug-client-0.2.8/src/ch-ccmx.c:1762:37:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
	current_folder = g_build_filename (g_get_home_dir (),
data/colorhug-client-0.2.8/src/ch-main.c:2822:13:  [3] (random) g_random_int_range:
  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.
		data[i] = g_random_int_range (0x00, 0xff);
data/colorhug-client-0.2.8/src/ch-self-test.c:42:8:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	tmp = realpath (path, full_tmp);
data/colorhug-client-0.2.8/src/ch-flash.c:536: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 (priv->firmware_data,
data/colorhug-client-0.2.8/src/ch-self-test.c:39: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 full_tmp[PATH_MAX];
data/colorhug-client-0.2.8/src/ch-backlight-resources.c:653:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  __pragma(section(".CRT$XCU",read)) \
data/colorhug-client-0.2.8/src/ch-backlight-resources.c:659:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  __pragma(section(".CRT$XCU",read)) \
data/colorhug-client-0.2.8/src/ch-backlight-resources.c:671:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  section(".CRT$XCU",read)
data/colorhug-client-0.2.8/src/ch-backlight-resources.c:678:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  section(".CRT$XCU",read)
data/colorhug-client-0.2.8/src/ch-ccmx-resources.c:1205:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  __pragma(section(".CRT$XCU",read)) \
data/colorhug-client-0.2.8/src/ch-ccmx-resources.c:1211:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  __pragma(section(".CRT$XCU",read)) \
data/colorhug-client-0.2.8/src/ch-ccmx-resources.c:1223:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  section(".CRT$XCU",read)
data/colorhug-client-0.2.8/src/ch-ccmx-resources.c:1230:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  section(".CRT$XCU",read)
data/colorhug-client-0.2.8/src/ch-flash-resources.c:916:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  __pragma(section(".CRT$XCU",read)) \
data/colorhug-client-0.2.8/src/ch-flash-resources.c:922:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  __pragma(section(".CRT$XCU",read)) \
data/colorhug-client-0.2.8/src/ch-flash-resources.c:934:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  section(".CRT$XCU",read)
data/colorhug-client-0.2.8/src/ch-flash-resources.c:941:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  section(".CRT$XCU",read)
data/colorhug-client-0.2.8/src/ch-main.c:117: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 (item->name);
data/colorhug-client-0.2.8/src/ch-main.c:132: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 (item->name);
data/colorhug-client-0.2.8/src/ch-main.c:184:11:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		value = getchar ();
data/colorhug-client-0.2.8/src/ch-main.c:919: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 (values[11]) > CH_CALIBRATION_DESCRIPTION_LEN) {
data/colorhug-client-0.2.8/src/ch-main.c:1172:5:  [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(values[0]) >= CH_OWNER_LENGTH_MAX) {
data/colorhug-client-0.2.8/src/ch-main.c:1225:5:  [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(values[0]) >= CH_OWNER_LENGTH_MAX) {
data/colorhug-client-0.2.8/src/ch-markdown.c:95: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 (line);
data/colorhug-client-0.2.8/src/ch-markdown.c:198: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 (line);
data/colorhug-client-0.2.8/src/ch-markdown.c:281: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 (formatter);
data/colorhug-client-0.2.8/src/ch-markdown.c:451: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 (text);
data/colorhug-client-0.2.8/src/ch-refresh-resources.c:653:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  __pragma(section(".CRT$XCU",read)) \
data/colorhug-client-0.2.8/src/ch-refresh-resources.c:659:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  __pragma(section(".CRT$XCU",read)) \
data/colorhug-client-0.2.8/src/ch-refresh-resources.c:671:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  section(".CRT$XCU",read)
data/colorhug-client-0.2.8/src/ch-refresh-resources.c:678:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  section(".CRT$XCU",read)

ANALYSIS SUMMARY:

Hits = 31
Lines analyzed = 17610 in approximately 0.59 seconds (29795 lines/second)
Physical Source Lines of Code (SLOC) = 13631
Hits@level = [0]   0 [1]  26 [2]   2 [3]   3 [4]   0 [5]   0
Hits@level+ = [0+]  31 [1+]  31 [2+]   5 [3+]   3 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 2.27423 [1+] 2.27423 [2+] 0.366811 [3+] 0.220087 [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.