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/lunar-date-2.4.0/lunar-date/lunar-date.h
Examining data/lunar-date-2.4.0/lunar-date/lunar-version.h
Examining data/lunar-date-2.4.0/lunar-date/lunar-date.c
Examining data/lunar-date-2.4.0/lunar-date/lunar-version.c
Examining data/lunar-date-2.4.0/lunar-date/lunar-date-private.c
Examining data/lunar-date-2.4.0/lunar-date/lunar-date-enum-types.c
Examining data/lunar-date-2.4.0/lunar-date/lunar-date-enum-types.h
Examining data/lunar-date-2.4.0/lunar-date/lunar-date-private.h
Examining data/lunar-date-2.4.0/tests/test-date.c

FINAL RESULTS:

data/lunar-date-2.4.0/tests/test-date.c:87:19:  [3] (random) g_rand_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.
	GDateYear year = g_rand_int_range(rand, 1900, 2049);
data/lunar-date-2.4.0/tests/test-date.c:88:21:  [3] (random) g_rand_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.
	GDateMonth month = g_rand_int_range(rand, 1, 12);
data/lunar-date-2.4.0/tests/test-date.c:89:17:  [3] (random) g_rand_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.
	GDateDay day = g_rand_int_range(rand, 1, 31);
data/lunar-date-2.4.0/tests/test-date.c:90:20:  [3] (random) g_rand_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.
	gboolean isleap = g_rand_int_range(rand, 0, 1);
data/lunar-date-2.4.0/tests/test-date.c:91:16:  [3] (random) g_rand_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.
	guint8 hour = g_rand_int_range(rand, 0, 23);
data/lunar-date-2.4.0/tests/test-date.c:113:20:  [3] (random) g_rand_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.
	gboolean isleap = g_rand_int_range(rand, 0, 1);
data/lunar-date-2.4.0/tests/test-date.c:114:16:  [3] (random) g_rand_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.
	guint8 hour = g_rand_int_range(rand, 0, 23);
data/lunar-date-2.4.0/lunar-date/lunar-date.c:431:10:  [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.
		static char str_jq[24][20] = {'9'};
data/lunar-date-2.4.0/lunar-date/lunar-date.c:433: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 yc[5] = {str_jq[0][0], str_jq[0][1], str_jq[0][2], str_jq[0][3], '\0'};
data/lunar-date-2.4.0/lunar-date/lunar-date.c:434:6:  [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).
		if(atoi(yc) != priv->solar->year)
data/lunar-date-2.4.0/tests/test-date.c:109: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).
	GDateYear year = atoi(argv[1]);
data/lunar-date-2.4.0/tests/test-date.c:110: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).
	GDateMonth month =	atoi(argv[2]);
data/lunar-date-2.4.0/tests/test-date.c:111: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).
	GDateDay day = atoi(argv[3]);
data/lunar-date-2.4.0/lunar-date/lunar-date.c:126:47:  [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 (g_str_has_prefix(langs[i], "zh_") &&  (strlen(langs[i])>= 5))
data/lunar-date-2.4.0/lunar-date/lunar-date.c:710:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(bufs, *buf, 4);
data/lunar-date-2.4.0/lunar-date/lunar-date.c:721:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(bufs, tmp, 4);

ANALYSIS SUMMARY:

Hits = 16
Lines analyzed = 2308 in approximately 0.11 seconds (21556 lines/second)
Physical Source Lines of Code (SLOC) = 1580
Hits@level = [0]   0 [1]   3 [2]   6 [3]   7 [4]   0 [5]   0
Hits@level+ = [0+]  16 [1+]  16 [2+]  13 [3+]   7 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 10.1266 [1+] 10.1266 [2+] 8.22785 [3+] 4.43038 [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.