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/gnome-system-tools-3.0.0/src/common/gst-dialog.c
Examining data/gnome-system-tools-3.0.0/src/common/gst-dialog.h
Examining data/gnome-system-tools-3.0.0/src/common/gst-tool.h
Examining data/gnome-system-tools-3.0.0/src/common/gst-platform-dialog.c
Examining data/gnome-system-tools-3.0.0/src/common/gst-platform-dialog.h
Examining data/gnome-system-tools-3.0.0/src/common/gst-filter.c
Examining data/gnome-system-tools-3.0.0/src/common/gst-filter.h
Examining data/gnome-system-tools-3.0.0/src/common/gst-service-role.c
Examining data/gnome-system-tools-3.0.0/src/common/gst-service-role.h
Examining data/gnome-system-tools-3.0.0/src/common/gst.h
Examining data/gnome-system-tools-3.0.0/src/common/um-lockbutton.c
Examining data/gnome-system-tools-3.0.0/src/common/um-lockbutton.h
Examining data/gnome-system-tools-3.0.0/src/common/gst-tool.c
Examining data/gnome-system-tools-3.0.0/src/network/essid-list.c
Examining data/gnome-system-tools-3.0.0/src/network/essid-list.h
Examining data/gnome-system-tools-3.0.0/src/network/nm-integration.c
Examining data/gnome-system-tools-3.0.0/src/network/nm-integration.h
Examining data/gnome-system-tools-3.0.0/src/network/address-list.c
Examining data/gnome-system-tools-3.0.0/src/network/address-list.h
Examining data/gnome-system-tools-3.0.0/src/network/network-locations.c
Examining data/gnome-system-tools-3.0.0/src/network/network-locations.h
Examining data/gnome-system-tools-3.0.0/src/network/locations-combo.c
Examining data/gnome-system-tools-3.0.0/src/network/locations-combo.h
Examining data/gnome-system-tools-3.0.0/src/network/ifaces-list.c
Examining data/gnome-system-tools-3.0.0/src/network/ifaces-list.h
Examining data/gnome-system-tools-3.0.0/src/network/connection.c
Examining data/gnome-system-tools-3.0.0/src/network/connection.h
Examining data/gnome-system-tools-3.0.0/src/network/hosts.c
Examining data/gnome-system-tools-3.0.0/src/network/hosts.h
Examining data/gnome-system-tools-3.0.0/src/network/callbacks.c
Examining data/gnome-system-tools-3.0.0/src/network/callbacks.h
Examining data/gnome-system-tools-3.0.0/src/network/main.c
Examining data/gnome-system-tools-3.0.0/src/network/network-tool.c
Examining data/gnome-system-tools-3.0.0/src/network/network-tool.h
Examining data/gnome-system-tools-3.0.0/src/services/main.c
Examining data/gnome-system-tools-3.0.0/src/services/callbacks.c
Examining data/gnome-system-tools-3.0.0/src/services/callbacks.h
Examining data/gnome-system-tools-3.0.0/src/services/service.c
Examining data/gnome-system-tools-3.0.0/src/services/service.h
Examining data/gnome-system-tools-3.0.0/src/services/table.c
Examining data/gnome-system-tools-3.0.0/src/services/table.h
Examining data/gnome-system-tools-3.0.0/src/services/service-settings-table.c
Examining data/gnome-system-tools-3.0.0/src/services/service-settings-table.h
Examining data/gnome-system-tools-3.0.0/src/services/services-tool.c
Examining data/gnome-system-tools-3.0.0/src/services/services-tool.h
Examining data/gnome-system-tools-3.0.0/src/shares/table.c
Examining data/gnome-system-tools-3.0.0/src/shares/table.h
Examining data/gnome-system-tools-3.0.0/src/shares/users-table.c
Examining data/gnome-system-tools-3.0.0/src/shares/users-table.h
Examining data/gnome-system-tools-3.0.0/src/shares/nfs-acl-table.c
Examining data/gnome-system-tools-3.0.0/src/shares/nfs-acl-table.h
Examining data/gnome-system-tools-3.0.0/src/shares/callbacks.c
Examining data/gnome-system-tools-3.0.0/src/shares/callbacks.h
Examining data/gnome-system-tools-3.0.0/src/shares/share-settings.c
Examining data/gnome-system-tools-3.0.0/src/shares/share-settings.h
Examining data/gnome-system-tools-3.0.0/src/shares/share-nfs-add-hosts.c
Examining data/gnome-system-tools-3.0.0/src/shares/share-nfs-add-hosts.h
Examining data/gnome-system-tools-3.0.0/src/shares/shares-tool.c
Examining data/gnome-system-tools-3.0.0/src/shares/shares-tool.h
Examining data/gnome-system-tools-3.0.0/src/shares/main.c
Examining data/gnome-system-tools-3.0.0/src/shares/nautilus/nautilus-shares.c
Examining data/gnome-system-tools-3.0.0/src/shares/nautilus/nautilus-shares.h
Examining data/gnome-system-tools-3.0.0/src/shares/nautilus/gst-shares-module.c
Examining data/gnome-system-tools-3.0.0/src/time/time-tool.c
Examining data/gnome-system-tools-3.0.0/src/time/time-tool.h
Examining data/gnome-system-tools-3.0.0/src/time/tz.c
Examining data/gnome-system-tools-3.0.0/src/time/tz.h
Examining data/gnome-system-tools-3.0.0/src/time/tz-map.c
Examining data/gnome-system-tools-3.0.0/src/time/tz-map.h
Examining data/gnome-system-tools-3.0.0/src/time/ntp-servers-list.c
Examining data/gnome-system-tools-3.0.0/src/time/ntp-servers-list.h
Examining data/gnome-system-tools-3.0.0/src/time/main.c
Examining data/gnome-system-tools-3.0.0/src/time/e-map/e-map.c
Examining data/gnome-system-tools-3.0.0/src/time/e-map/e-map.h
Examining data/gnome-system-tools-3.0.0/src/time/e-map/e-map-marshal.c
Examining data/gnome-system-tools-3.0.0/src/time/e-map/e-map-marshal.h
Examining data/gnome-system-tools-3.0.0/src/time/e-map/e-map-test.c
Examining data/gnome-system-tools-3.0.0/src/users/main.c
Examining data/gnome-system-tools-3.0.0/src/users/passwd.c
Examining data/gnome-system-tools-3.0.0/src/users/passwd.h
Examining data/gnome-system-tools-3.0.0/src/users/users-tool.h
Examining data/gnome-system-tools-3.0.0/src/users/callbacks.h
Examining data/gnome-system-tools-3.0.0/src/users/user-settings.c
Examining data/gnome-system-tools-3.0.0/src/users/group-settings.c
Examining data/gnome-system-tools-3.0.0/src/users/group-settings.h
Examining data/gnome-system-tools-3.0.0/src/users/users-table.c
Examining data/gnome-system-tools-3.0.0/src/users/users-table.h
Examining data/gnome-system-tools-3.0.0/src/users/groups-table.c
Examining data/gnome-system-tools-3.0.0/src/users/groups-table.h
Examining data/gnome-system-tools-3.0.0/src/users/table.c
Examining data/gnome-system-tools-3.0.0/src/users/table.h
Examining data/gnome-system-tools-3.0.0/src/users/privileges-table.h
Examining data/gnome-system-tools-3.0.0/src/users/group-members-table.c
Examining data/gnome-system-tools-3.0.0/src/users/group-members-table.h
Examining data/gnome-system-tools-3.0.0/src/users/user-profiles.c
Examining data/gnome-system-tools-3.0.0/src/users/user-profiles.h
Examining data/gnome-system-tools-3.0.0/src/users/test-battery.c
Examining data/gnome-system-tools-3.0.0/src/users/test-battery.h
Examining data/gnome-system-tools-3.0.0/src/users/run-passwd.c
Examining data/gnome-system-tools-3.0.0/src/users/run-passwd.h
Examining data/gnome-system-tools-3.0.0/src/users/user-password.c
Examining data/gnome-system-tools-3.0.0/src/users/user-password.h
Examining data/gnome-system-tools-3.0.0/src/users/users-tool.c
Examining data/gnome-system-tools-3.0.0/src/users/privileges-table.c
Examining data/gnome-system-tools-3.0.0/src/users/callbacks.c
Examining data/gnome-system-tools-3.0.0/src/users/user-settings.h

FINAL RESULTS:

data/gnome-system-tools-3.0.0/src/network/network-locations.c:103:27:  [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.
  dir = g_build_filename (g_get_home_dir (),
data/gnome-system-tools-3.0.0/src/users/main.c:78: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/gnome-system-tools-3.0.0/src/time/tz.c:53: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[4096];
data/gnome-system-tools-3.0.0/src/time/tz.c:60: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).
	tzfile = fopen (tz_data_file, "r");
data/gnome-system-tools-3.0.0/src/common/gst-filter.c:190:57:  [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).
    success = (strspn (str, "0123456789abcdABCD,#*") == strlen (str));
data/gnome-system-tools-3.0.0/src/network/connection.c:872:48:  [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 ((sscanf (address, "%d.", &ip1) == 1) && (strlen (netmask) == 0))
data/gnome-system-tools-3.0.0/src/network/network-locations.c:359:7:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  if (equal)
data/gnome-system-tools-3.0.0/src/network/network-locations.c:370:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return equal;
data/gnome-system-tools-3.0.0/src/network/network-locations.c:388:34:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  while (str_list[i] && valid && equal)
data/gnome-system-tools-3.0.0/src/network/network-locations.c:403:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return equal;
data/gnome-system-tools-3.0.0/src/network/network-locations.c:612:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      if (!equal)
data/gnome-system-tools-3.0.0/src/network/network-locations.c:618:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return equal;
data/gnome-system-tools-3.0.0/src/network/network-locations.c:678:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  gboolean equal;
data/gnome-system-tools-3.0.0/src/network/network-locations.c:690:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return equal;
data/gnome-system-tools-3.0.0/src/time/tz.c:288: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).
	if (!pos || strlen(pos) < 4 || digits > 9) return 0.0;
data/gnome-system-tools-3.0.0/src/time/tz.c:297:43:  [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 (t1 >= 0.0) return t1 + t2/pow (10.0, strlen(fraction));
data/gnome-system-tools-3.0.0/src/time/tz.c:298: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).
	else return t1 - t2/pow (10.0, strlen(fraction));
data/gnome-system-tools-3.0.0/src/users/group-settings.c:216: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 (name) < 1) {
data/gnome-system-tools-3.0.0/src/users/main.c:74: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).
	width = MAX (strlen (_("Not asked on login")), strlen (_("Asked on login")));
data/gnome-system-tools-3.0.0/src/users/main.c:74: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).
	width = MAX (strlen (_("Not asked on login")), strlen (_("Asked on login")));
data/gnome-system-tools-3.0.0/src/users/passwd.c:49: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).
	alnum_len = strlen (alphanum);
data/gnome-system-tools-3.0.0/src/users/run-passwd.c:333:19:  [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).
		memset (buf, 0, strlen (buf));
data/gnome-system-tools-3.0.0/src/users/run-passwd.c:346: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) == 0) {
data/gnome-system-tools-3.0.0/src/users/user-password.c:90: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 (password);
data/gnome-system-tools-3.0.0/src/users/user-password.c:488: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 (password) > 0) {
data/gnome-system-tools-3.0.0/src/users/user-password.c:539: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).
	else if (strlen (passwd) == 0) {
data/gnome-system-tools-3.0.0/src/users/user-settings.c:426: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 (home) < 1 || !g_path_is_absolute (home)) {
data/gnome-system-tools-3.0.0/src/users/user-settings.c:632: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 (path) < 1 || !g_path_is_absolute (path)) {
data/gnome-system-tools-3.0.0/src/users/user-settings.c:775:16:  [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).
	valid_name = (strlen (name) > 0);
data/gnome-system-tools-3.0.0/src/users/user-settings.c:797:30:  [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).
	stripped_name = g_strnfill (strlen (lc_name) + 1, '\0');
data/gnome-system-tools-3.0.0/src/users/user-settings.c:810: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 (stripped_name) <= 0) {
data/gnome-system-tools-3.0.0/src/users/user-settings.c:834:30:  [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).
	item1 = g_string_sized_new (strlen (words1[0]) + len - 1 + 5);
data/gnome-system-tools-3.0.0/src/users/user-settings.c:835:30:  [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).
	item3 = g_string_sized_new (strlen (words1[0]) + len - 1 + 5);
data/gnome-system-tools-3.0.0/src/users/user-settings.c:837:30:  [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).
	item2 = g_string_sized_new (strlen (words1[len - 1]) + len - 1 + 5);
data/gnome-system-tools-3.0.0/src/users/user-settings.c:838:30:  [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).
	item4 = g_string_sized_new (strlen (words1[len - 1]) + len - 1 + 5);
data/gnome-system-tools-3.0.0/src/users/user-settings.c:847: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 (*w1) == 0)
data/gnome-system-tools-3.0.0/src/users/user-settings.c:860: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 (*words2) > 0)
data/gnome-system-tools-3.0.0/src/users/user-settings.c:864: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).
			if (strlen (*w2) == 0)
data/gnome-system-tools-3.0.0/src/users/user-settings.c:981: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).
	empty_login = (strlen (login) <= 0);

ANALYSIS SUMMARY:

Hits = 39
Lines analyzed = 23883 in approximately 0.61 seconds (38839 lines/second)
Physical Source Lines of Code (SLOC) = 16541
Hits@level = [0]   2 [1]  35 [2]   2 [3]   2 [4]   0 [5]   0
Hits@level+ = [0+]  41 [1+]  39 [2+]   4 [3+]   2 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 2.47869 [1+] 2.35778 [2+] 0.241823 [3+] 0.120912 [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.