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-settings-daemon-3.38.1/data/gsd-enums.h
Examining data/gnome-settings-daemon-3.38.1/gnome-settings-daemon/gnome-settings-bus.c
Examining data/gnome-settings-daemon-3.38.1/gnome-settings-daemon/gnome-settings-bus.h
Examining data/gnome-settings-daemon-3.38.1/gnome-settings-daemon/gnome-settings-module.c
Examining data/gnome-settings-daemon-3.38.1/gnome-settings-daemon/gnome-settings-module.h
Examining data/gnome-settings-daemon-3.38.1/gnome-settings-daemon/gnome-settings-plugin-info.c
Examining data/gnome-settings-daemon-3.38.1/gnome-settings-daemon/gnome-settings-plugin-info.h
Examining data/gnome-settings-daemon-3.38.1/gnome-settings-daemon/gnome-settings-profile.c
Examining data/gnome-settings-daemon-3.38.1/gnome-settings-daemon/gnome-settings-profile.h
Examining data/gnome-settings-daemon-3.38.1/plugins/a11y-settings/gsd-a11y-settings-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/a11y-settings/gsd-a11y-settings-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/a11y-settings/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gcm-edid.c
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gcm-edid.h
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gcm-self-test.c
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gnome-datetime-source.c
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gnome-datetime-source.h
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gsd-color-calibrate.c
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gsd-color-calibrate.h
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gsd-color-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gsd-color-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gsd-color-profiles.c
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gsd-color-profiles.h
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gsd-color-state.c
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gsd-color-state.h
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gsd-night-light-common.c
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gsd-night-light-common.h
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gsd-night-light.c
Examining data/gnome-settings-daemon-3.38.1/plugins/color/gsd-night-light.h
Examining data/gnome-settings-daemon-3.38.1/plugins/color/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/common/daemon-skeleton-gtk.h
Examining data/gnome-settings-daemon-3.38.1/plugins/common/daemon-skeleton.h
Examining data/gnome-settings-daemon-3.38.1/plugins/common/gsd-input-helper.c
Examining data/gnome-settings-daemon-3.38.1/plugins/common/gsd-input-helper.h
Examining data/gnome-settings-daemon-3.38.1/plugins/common/gsd-settings-migrate.c
Examining data/gnome-settings-daemon-3.38.1/plugins/common/gsd-settings-migrate.h
Examining data/gnome-settings-daemon-3.38.1/plugins/common/gsd-shell-helper.c
Examining data/gnome-settings-daemon-3.38.1/plugins/common/gsd-shell-helper.h
Examining data/gnome-settings-daemon-3.38.1/plugins/datetime/gsd-datetime-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/datetime/gsd-datetime-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/datetime/gsd-timezone-monitor.c
Examining data/gnome-settings-daemon-3.38.1/plugins/datetime/gsd-timezone-monitor.h
Examining data/gnome-settings-daemon-3.38.1/plugins/datetime/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/datetime/tz.c
Examining data/gnome-settings-daemon-3.38.1/plugins/datetime/tz.h
Examining data/gnome-settings-daemon-3.38.1/plugins/datetime/weather-tz.c
Examining data/gnome-settings-daemon-3.38.1/plugins/datetime/weather-tz.h
Examining data/gnome-settings-daemon-3.38.1/plugins/housekeeping/gsd-disk-space-helper.c
Examining data/gnome-settings-daemon-3.38.1/plugins/housekeeping/gsd-disk-space-helper.h
Examining data/gnome-settings-daemon-3.38.1/plugins/housekeeping/gsd-disk-space-test.c
Examining data/gnome-settings-daemon-3.38.1/plugins/housekeeping/gsd-disk-space.c
Examining data/gnome-settings-daemon-3.38.1/plugins/housekeeping/gsd-disk-space.h
Examining data/gnome-settings-daemon-3.38.1/plugins/housekeeping/gsd-empty-trash-test.c
Examining data/gnome-settings-daemon-3.38.1/plugins/housekeeping/gsd-housekeeping-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/housekeeping/gsd-purge-temp-test.c
Examining data/gnome-settings-daemon-3.38.1/plugins/housekeeping/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/housekeeping/gsd-housekeeping-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/keyboard/gsd-keyboard-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/keyboard/gsd-keyboard-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/keyboard/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/media-keys/audio-selection-test.c
Examining data/gnome-settings-daemon-3.38.1/plugins/media-keys/bus-watch-namespace.c
Examining data/gnome-settings-daemon-3.38.1/plugins/media-keys/bus-watch-namespace.h
Examining data/gnome-settings-daemon-3.38.1/plugins/media-keys/gsd-media-keys-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/media-keys/gsd-media-keys-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/media-keys/gsd-screenshot-utils.c
Examining data/gnome-settings-daemon-3.38.1/plugins/media-keys/gsd-screenshot-utils.h
Examining data/gnome-settings-daemon-3.38.1/plugins/media-keys/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/media-keys/media-keys.h
Examining data/gnome-settings-daemon-3.38.1/plugins/media-keys/mpris-controller.c
Examining data/gnome-settings-daemon-3.38.1/plugins/media-keys/mpris-controller.h
Examining data/gnome-settings-daemon-3.38.1/plugins/media-keys/shell-action-modes.h
Examining data/gnome-settings-daemon-3.38.1/plugins/media-keys/shortcuts-list.h
Examining data/gnome-settings-daemon-3.38.1/plugins/power/gpm-common.c
Examining data/gnome-settings-daemon-3.38.1/plugins/power/gpm-common.h
Examining data/gnome-settings-daemon-3.38.1/plugins/power/gsd-backlight-helper.c
Examining data/gnome-settings-daemon-3.38.1/plugins/power/gsd-backlight.c
Examining data/gnome-settings-daemon-3.38.1/plugins/power/gsd-backlight.h
Examining data/gnome-settings-daemon-3.38.1/plugins/power/gsd-power-constants.h
Examining data/gnome-settings-daemon-3.38.1/plugins/power/gsd-power-enums-update.c
Examining data/gnome-settings-daemon-3.38.1/plugins/power/gsd-power-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/power/gsm-inhibitor-flag.h
Examining data/gnome-settings-daemon-3.38.1/plugins/power/gsm-manager-logout-mode.h
Examining data/gnome-settings-daemon-3.38.1/plugins/power/gsm-presence-flag.h
Examining data/gnome-settings-daemon-3.38.1/plugins/power/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/power/gsd-power-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/print-notifications/gsd-print-notifications-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/print-notifications/gsd-print-notifications-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/print-notifications/gsd-printer.c
Examining data/gnome-settings-daemon-3.38.1/plugins/print-notifications/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/rfkill/gsd-rfkill-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/rfkill/gsd-rfkill-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/rfkill/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/rfkill/rfkill-glib.c
Examining data/gnome-settings-daemon-3.38.1/plugins/rfkill/rfkill-glib.h
Examining data/gnome-settings-daemon-3.38.1/plugins/rfkill/rfkill.h
Examining data/gnome-settings-daemon-3.38.1/plugins/screensaver-proxy/gsd-screensaver-proxy-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/screensaver-proxy/gsd-screensaver-proxy-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/screensaver-proxy/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/sharing/gsd-sharing-enums.h
Examining data/gnome-settings-daemon-3.38.1/plugins/sharing/gsd-sharing-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/sharing/gsd-sharing-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/sharing/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/smartcard/gsd-smartcard-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/smartcard/gsd-smartcard-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/smartcard/gsd-smartcard-service.c
Examining data/gnome-settings-daemon-3.38.1/plugins/smartcard/gsd-smartcard-service.h
Examining data/gnome-settings-daemon-3.38.1/plugins/smartcard/gsd-smartcard-utils.c
Examining data/gnome-settings-daemon-3.38.1/plugins/smartcard/gsd-smartcard-utils.h
Examining data/gnome-settings-daemon-3.38.1/plugins/smartcard/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/sound/gsd-sound-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/sound/gsd-sound-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/sound/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/usb-protection/gsd-usb-protection-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/usb-protection/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/usb-protection/gsd-usb-protection-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/wacom/gsd-wacom-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/wacom/gsd-wacom-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/wacom/gsd-wacom-oled-constants.h
Examining data/gnome-settings-daemon-3.38.1/plugins/wacom/gsd-wacom-oled-helper.c
Examining data/gnome-settings-daemon-3.38.1/plugins/wacom/gsd-wacom-oled.c
Examining data/gnome-settings-daemon-3.38.1/plugins/wacom/gsd-wacom-oled.h
Examining data/gnome-settings-daemon-3.38.1/plugins/wacom/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/wwan/cc-wwan-device.c
Examining data/gnome-settings-daemon-3.38.1/plugins/wwan/cc-wwan-device.h
Examining data/gnome-settings-daemon-3.38.1/plugins/wwan/cc-wwan-errors-private.h
Examining data/gnome-settings-daemon-3.38.1/plugins/wwan/gsd-wwan-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/wwan/gsd-wwan-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/wwan/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/xsettings/fc-monitor.c
Examining data/gnome-settings-daemon-3.38.1/plugins/xsettings/fc-monitor.h
Examining data/gnome-settings-daemon-3.38.1/plugins/xsettings/gsd-remote-display-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/xsettings/gsd-xsettings-gtk.c
Examining data/gnome-settings-daemon-3.38.1/plugins/xsettings/gsd-xsettings-gtk.h
Examining data/gnome-settings-daemon-3.38.1/plugins/xsettings/gsd-xsettings-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/xsettings/gsd-xsettings-manager.h
Examining data/gnome-settings-daemon-3.38.1/plugins/xsettings/main.c
Examining data/gnome-settings-daemon-3.38.1/plugins/xsettings/test-gtk-modules.c
Examining data/gnome-settings-daemon-3.38.1/plugins/xsettings/test-wm-button-layout-translations.c
Examining data/gnome-settings-daemon-3.38.1/plugins/xsettings/wm-button-layout-translation.c
Examining data/gnome-settings-daemon-3.38.1/plugins/xsettings/wm-button-layout-translation.h
Examining data/gnome-settings-daemon-3.38.1/plugins/xsettings/xsettings-common.c
Examining data/gnome-settings-daemon-3.38.1/plugins/xsettings/xsettings-common.h
Examining data/gnome-settings-daemon-3.38.1/plugins/xsettings/xsettings-manager.c
Examining data/gnome-settings-daemon-3.38.1/plugins/xsettings/xsettings-manager.h
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-channel-map-private.h
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-channel-map.c
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-channel-map.h
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-card-private.h
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-card.c
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-card.h
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-control-private.h
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-control.c
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-control.h
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-event-role.c
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-event-role.h
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-sink-input.c
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-sink-input.h
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-sink.c
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-sink.h
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-source-output.c
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-source-output.h
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-source.c
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-source.h
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-stream-private.h
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-stream.c
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-stream.h
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-ui-device.c
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-ui-device.h
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-pulseaudio-fake.h
Examining data/gnome-settings-daemon-3.38.1/subprojects/gvc/test-audio-device-selection.c

FINAL RESULTS:

data/gnome-settings-daemon-3.38.1/plugins/xsettings/wm-button-layout-translation.c:56:7:  [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 (layout + len, gtkbutton);
data/gnome-settings-daemon-3.38.1/plugins/common/daemon-skeleton-gtk.h:226:32:  [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.
		const gchar *setup_display = getenv ("GNOME_SETUP_DISPLAY");
data/gnome-settings-daemon-3.38.1/plugins/datetime/tz.c:211:27:  [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.
	tz_env_value = g_strdup (getenv ("TZ"));
data/gnome-settings-daemon-3.38.1/plugins/housekeeping/gsd-disk-space.c:518:37:  [3] (buffer) g_get_tmp_dir:
  This function is synonymous with 'getenv("TMP")';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.
        file = g_file_new_for_path (g_get_tmp_dir ());
data/gnome-settings-daemon-3.38.1/plugins/housekeeping/gsd-disk-space.c:526:24:  [3] (buffer) g_get_tmp_dir:
  This function is synonymous with 'getenv("TMP")';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.
        if (g_strcmp0 (g_get_tmp_dir (), "/var/tmp") != 0) {
data/gnome-settings-daemon-3.38.1/plugins/housekeeping/gsd-disk-space.c:536:24:  [3] (buffer) g_get_tmp_dir:
  This function is synonymous with 'getenv("TMP")';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.
        if (g_strcmp0 (g_get_tmp_dir (), "/tmp") != 0) {
data/gnome-settings-daemon-3.38.1/plugins/housekeeping/gsd-housekeeping-manager.c:213:34:  [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.
        path = g_build_filename (g_get_home_dir (),
data/gnome-settings-daemon-3.38.1/plugins/housekeeping/gsd-housekeeping-manager.c:219:34:  [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.
        path = g_build_filename (g_get_home_dir (),
data/gnome-settings-daemon-3.38.1/plugins/housekeeping/gsd-housekeeping-manager.c:225:34:  [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.
        path = g_build_filename (g_get_home_dir (),
data/gnome-settings-daemon-3.38.1/plugins/media-keys/gsd-media-keys-manager.c:1230:30:  [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.
	file = g_file_new_for_path (g_get_home_dir ());
data/gnome-settings-daemon-3.38.1/plugins/power/gsd-backlight-helper.c:88:11:  [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.
	device = realpath (argv[1], NULL);
data/gnome-settings-daemon-3.38.1/plugins/power/gsd-backlight-helper.c:110:10:  [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.
		path = realpath (tmp, NULL);
data/gnome-settings-daemon-3.38.1/plugins/color/gsd-color-state.c:800:41:  [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).
                brightness_percentage = atoi (brightness_profile);
data/gnome-settings-daemon-3.38.1/plugins/datetime/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-settings-daemon-3.38.1/plugins/datetime/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-settings-daemon-3.38.1/plugins/power/gpm-common.c:141:39:  [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).
                *is_virtual_machine = atoi (arg);
data/gnome-settings-daemon-3.38.1/plugins/power/gsd-backlight-helper.c:55: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 tmp[512];
data/gnome-settings-daemon-3.38.1/plugins/power/gsd-backlight-helper.c:113:4:  [2] (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 string.
			strcat (tmp, "/brightness");
data/gnome-settings-daemon-3.38.1/plugins/power/gsd-backlight-helper.c:115:9:  [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 (tmp, O_WRONLY);
data/gnome-settings-daemon-3.38.1/plugins/print-notifications/gsd-print-notifications-manager.c:193:16:  [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).
        type = atoi (type_str);
data/gnome-settings-daemon-3.38.1/plugins/print-notifications/gsd-print-notifications-manager.c:987:41:  [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[8192];
data/gnome-settings-daemon-3.38.1/plugins/print-notifications/gsd-print-notifications-manager.c:1248:17:  [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 *args[2];
data/gnome-settings-daemon-3.38.1/plugins/rfkill/rfkill-glib.c:398: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 (rfkill->device_file, O_RDWR);
data/gnome-settings-daemon-3.38.1/plugins/rfkill/rfkill-glib.c:557:8:  [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 (rfkill->device_file, O_WRONLY);
data/gnome-settings-daemon-3.38.1/plugins/wacom/gsd-wacom-oled-helper.c:70:11:  [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.
	unsigned char image[BT_BUF_LEN];
data/gnome-settings-daemon-3.38.1/plugins/wacom/gsd-wacom-oled-helper.c:77:11:  [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.
	unsigned char buf[256];
data/gnome-settings-daemon-3.38.1/plugins/wacom/gsd-wacom-oled-helper.c:178: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_WRONLY);
data/gnome-settings-daemon-3.38.1/plugins/wacom/gsd-wacom-oled.c:61: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 delimiters[5] = "+-_ ";
data/gnome-settings-daemon-3.38.1/plugins/wacom/gsd-wacom-oled.c:107: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 line1[LABEL_SIZE + 1] = "";
data/gnome-settings-daemon-3.38.1/plugins/wacom/gsd-wacom-oled.c:108: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 line2[LABEL_SIZE + 1] = "";
data/gnome-settings-daemon-3.38.1/plugins/xsettings/gsd-xsettings-manager.c:808:9:  [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        dpibuf[G_ASCII_DTOSTR_BUF_SIZE];
data/gnome-settings-daemon-3.38.1/plugins/xsettings/xsettings-manager.c:110: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 buffer[256];
data/gnome-settings-daemon-3.38.1/plugins/xsettings/xsettings-manager.c:113:3:  [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(buffer, "_XSETTINGS_S%d", screen);
data/gnome-settings-daemon-3.38.1/plugins/xsettings/xsettings-manager.c:132: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 buffer[256];
data/gnome-settings-daemon-3.38.1/plugins/xsettings/xsettings-manager.c:139:3:  [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(buffer, "_XSETTINGS_S%d", screen);
data/gnome-settings-daemon-3.38.1/subprojects/gvc/gvc-mixer-control.c:1489:9:  [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            map_buff[PA_CHANNEL_MAP_SNPRINT_MAX];
data/gnome-settings-daemon-3.38.1/subprojects/gvc/test-audio-device-selection.c:27: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 *args[G_N_ELEMENTS (audio_selection_choices) + 1];
data/gnome-settings-daemon-3.38.1/plugins/datetime/tz.c:321: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).
		tz = tz + strlen ("right/");
data/gnome-settings-daemon-3.38.1/plugins/datetime/tz.c:323: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).
		tz = tz + strlen ("posix/");
data/gnome-settings-daemon-3.38.1/plugins/datetime/tz.c:377: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-settings-daemon-3.38.1/plugins/datetime/tz.c:386: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-settings-daemon-3.38.1/plugins/datetime/tz.c:387: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-settings-daemon-3.38.1/plugins/housekeeping/gsd-housekeeping-manager.c:121:29:  [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) == 36 && strcmp (name + 32, ".png") == 0) {
data/gnome-settings-daemon-3.38.1/plugins/media-keys/bus-watch-namespace.c:123: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_name = strlen (name);
data/gnome-settings-daemon-3.38.1/plugins/media-keys/bus-watch-namespace.c:124: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).
  len_namespace = strlen (name_space);
data/gnome-settings-daemon-3.38.1/plugins/media-keys/gsd-media-keys-manager.c:666:29:  [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 (*pos) > 0) {
data/gnome-settings-daemon-3.38.1/plugins/media-keys/gsd-media-keys-manager.c:1065: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).
	escaped = g_malloc (strlen (cmd) * 2 + 1);
data/gnome-settings-daemon-3.38.1/plugins/power/gpm-common.c:137: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).
        arg = word + strlen ("gnome.is_vm=");
data/gnome-settings-daemon-3.38.1/plugins/print-notifications/gsd-print-notifications-manager.c:926:54:  [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 (reasons[j])) == 0) {
data/gnome-settings-daemon-3.38.1/plugins/print-notifications/gsd-printer.c:389:27:  [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).
        tag_name_length = strlen (tag_name);
data/gnome-settings-daemon-3.38.1/plugins/print-notifications/gsd-printer.c:394:37:  [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 (tag_string_splitted[i]) > tag_name_length + 1)
data/gnome-settings-daemon-3.38.1/plugins/rfkill/rfkill-glib.c:346:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		gsize read;
data/gnome-settings-daemon-3.38.1/plugins/rfkill/rfkill-glib.c:351:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
						  &read,
data/gnome-settings-daemon-3.38.1/plugins/rfkill/rfkill-glib.c:365:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
							  &read,
data/gnome-settings-daemon-3.38.1/plugins/rfkill/rfkill-glib.c:421:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		len = read(fd, &event, sizeof(event));
data/gnome-settings-daemon-3.38.1/plugins/smartcard/gsd-smartcard-utils.c:38:32:  [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).
        studly_string_length = strlen (studly_string);
data/gnome-settings-daemon-3.38.1/plugins/smartcard/gsd-smartcard-utils.c:74: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).
            (dashed_string[strlen(old_prefix)] == '-' ||
data/gnome-settings-daemon-3.38.1/plugins/smartcard/gsd-smartcard-utils.c:75: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).
             dashed_string[strlen(old_prefix)] == '_')) {
data/gnome-settings-daemon-3.38.1/plugins/smartcard/gsd-smartcard-utils.c:76:34:  [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).
                dashed_string += strlen (old_prefix) + 1;
data/gnome-settings-daemon-3.38.1/plugins/smartcard/gsd-smartcard-utils.c:82: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).
        i += strlen (new_prefix) + 1;
data/gnome-settings-daemon-3.38.1/plugins/smartcard/gsd-smartcard-utils.c:84:36:  [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).
        dbus_error_string_length = strlen (dbus_error_string);
data/gnome-settings-daemon-3.38.1/plugins/wacom/gsd-wacom-oled.c:33:26:  [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 MAGIC_BASE64_LEN	strlen(MAGIC_BASE64)
data/gnome-settings-daemon-3.38.1/plugins/wwan/cc-wwan-device.c:1325: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 (password);
data/gnome-settings-daemon-3.38.1/plugins/xsettings/gsd-xsettings-manager.c:782: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).
        needle_len = strlen (needle);
data/gnome-settings-daemon-3.38.1/plugins/xsettings/wm-button-layout-translation.c:57: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 += strlen (gtkbutton);
data/gnome-settings-daemon-3.38.1/plugins/xsettings/xsettings-manager.c:301: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).
  len16 = strlen (setting->name);

ANALYSIS SUMMARY:

Hits = 66
Lines analyzed = 48487 in approximately 1.04 seconds (46820 lines/second)
Physical Source Lines of Code (SLOC) = 35336
Hits@level = [0]  23 [1]  29 [2]  25 [3]  11 [4]   1 [5]   0
Hits@level+ = [0+]  89 [1+]  66 [2+]  37 [3+]  12 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 2.51868 [1+] 1.86778 [2+] 1.04709 [3+] 0.339597 [4+] 0.0282998 [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.