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/mate-system-monitor-1.24.1/src/argv.cpp
Examining data/mate-system-monitor-1.24.1/src/argv.h
Examining data/mate-system-monitor-1.24.1/src/bacon-message-connection.c
Examining data/mate-system-monitor-1.24.1/src/bacon-message-connection.h
Examining data/mate-system-monitor-1.24.1/src/callbacks.cpp
Examining data/mate-system-monitor-1.24.1/src/callbacks.h
Examining data/mate-system-monitor-1.24.1/src/cgroups.cpp
Examining data/mate-system-monitor-1.24.1/src/cgroups.h
Examining data/mate-system-monitor-1.24.1/src/defaulttable.h
Examining data/mate-system-monitor-1.24.1/src/disks.cpp
Examining data/mate-system-monitor-1.24.1/src/disks.h
Examining data/mate-system-monitor-1.24.1/src/gsm_color_button.c
Examining data/mate-system-monitor-1.24.1/src/gsm_color_button.h
Examining data/mate-system-monitor-1.24.1/src/iconthemewrapper.cpp
Examining data/mate-system-monitor-1.24.1/src/iconthemewrapper.h
Examining data/mate-system-monitor-1.24.1/src/interface.cpp
Examining data/mate-system-monitor-1.24.1/src/interface.h
Examining data/mate-system-monitor-1.24.1/src/load-graph.cpp
Examining data/mate-system-monitor-1.24.1/src/load-graph.h
Examining data/mate-system-monitor-1.24.1/src/lsof.cpp
Examining data/mate-system-monitor-1.24.1/src/lsof.h
Examining data/mate-system-monitor-1.24.1/src/memmaps.cpp
Examining data/mate-system-monitor-1.24.1/src/memmaps.h
Examining data/mate-system-monitor-1.24.1/src/openfiles.cpp
Examining data/mate-system-monitor-1.24.1/src/openfiles.h
Examining data/mate-system-monitor-1.24.1/src/prettytable.cpp
Examining data/mate-system-monitor-1.24.1/src/prettytable.h
Examining data/mate-system-monitor-1.24.1/src/procactions.cpp
Examining data/mate-system-monitor-1.24.1/src/procactions.h
Examining data/mate-system-monitor-1.24.1/src/procdialogs.cpp
Examining data/mate-system-monitor-1.24.1/src/procdialogs.h
Examining data/mate-system-monitor-1.24.1/src/procman.cpp
Examining data/mate-system-monitor-1.24.1/src/procman.h
Examining data/mate-system-monitor-1.24.1/src/procman_gksu.cpp
Examining data/mate-system-monitor-1.24.1/src/procman_gksu.h
Examining data/mate-system-monitor-1.24.1/src/procman_pkexec.cpp
Examining data/mate-system-monitor-1.24.1/src/procman_pkexec.h
Examining data/mate-system-monitor-1.24.1/src/procproperties.cpp
Examining data/mate-system-monitor-1.24.1/src/procproperties.h
Examining data/mate-system-monitor-1.24.1/src/proctable.cpp
Examining data/mate-system-monitor-1.24.1/src/proctable.h
Examining data/mate-system-monitor-1.24.1/src/selection.cpp
Examining data/mate-system-monitor-1.24.1/src/selection.h
Examining data/mate-system-monitor-1.24.1/src/selinux.cpp
Examining data/mate-system-monitor-1.24.1/src/selinux.h
Examining data/mate-system-monitor-1.24.1/src/settings-keys.cpp
Examining data/mate-system-monitor-1.24.1/src/settings-keys.h
Examining data/mate-system-monitor-1.24.1/src/smooth_refresh.cpp
Examining data/mate-system-monitor-1.24.1/src/smooth_refresh.h
Examining data/mate-system-monitor-1.24.1/src/sysinfo.cpp
Examining data/mate-system-monitor-1.24.1/src/sysinfo.h
Examining data/mate-system-monitor-1.24.1/src/util.cpp
Examining data/mate-system-monitor-1.24.1/src/util.h
Examining data/mate-system-monitor-1.24.1/tools/msm_execute_helper.c

FINAL RESULTS:

data/mate-system-monitor-1.24.1/src/sysinfo.cpp:111:23:  [4] (shell) system:
  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.
        static string system()
data/mate-system-monitor-1.24.1/src/sysinfo.cpp:774:27:  [4] (shell) system:
  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.
        else if (SysInfo::system() == "FreeBSD") {
data/mate-system-monitor-1.24.1/src/sysinfo.cpp:777:27:  [4] (shell) system:
  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.
        else if (SysInfo::system() == "SunOS") {
data/mate-system-monitor-1.24.1/src/sysinfo.cpp:780:27:  [4] (shell) system:
  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.
        else if (SysInfo::system() == "NetBSD") {
data/mate-system-monitor-1.24.1/src/sysinfo.cpp:783:27:  [4] (shell) system:
  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.
        else if (SysInfo::system() == "OpenBSD") {
data/mate-system-monitor-1.24.1/src/util.h:14:27:  [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.
#define LOGIND_RUNNING() (access("/run/systemd/seats/", F_OK) >= 0)
data/mate-system-monitor-1.24.1/tools/msm_execute_helper.c:13:9:  [4] (shell) execvp:
  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 (execvp (COMMAND, argv_modified) == -1) {
data/mate-system-monitor-1.24.1/src/bacon-message-connection.c:236:37:  [3] (random) g_random_int:
  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.
                g_get_user_name (), g_random_int ());
data/mate-system-monitor-1.24.1/src/callbacks.cpp:311:5:  [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 key[80];
data/mate-system-monitor-1.24.1/src/load-graph.cpp:729: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(&colors[0], ProcData::get_instance()->config.cpu_color,
data/mate-system-monitor-1.24.1/src/memmaps.cpp:57:13:  [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[17];
data/mate-system-monitor-1.24.1/src/memmaps.cpp:168:5:  [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 flags[5] = "----";
data/mate-system-monitor-1.24.1/src/openfiles.cpp:59:5:  [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 hostname[NI_MAXHOST];
data/mate-system-monitor-1.24.1/src/openfiles.cpp:60:5:  [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 service[NI_MAXSERV];
data/mate-system-monitor-1.24.1/src/openfiles.cpp:61:5:  [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 port_str[6];
data/mate-system-monitor-1.24.1/src/prettytable.cpp:57: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).
    f = fopen (icon_name, "r");
data/mate-system-monitor-1.24.1/src/proctable.cpp:596:13:  [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 username[16];
data/mate-system-monitor-1.24.1/src/sysinfo.cpp:703:23:  [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).
                input.open("/etc/debian_version");
data/mate-system-monitor-1.24.1/tools/msm_execute_helper.c:9: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 (argv_modified, argv, argc * sizeof (char*));
data/mate-system-monitor-1.24.1/src/bacon-message-connection.c:144:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    rc = read (cd, &buf, 1);
data/mate-system-monitor-1.24.1/src/bacon-message-connection.c:150:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        rc = read (cd, &buf, 1);
data/mate-system-monitor-1.24.1/src/bacon-message-connection.c:173: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).
        subs += strlen (subs) + 1;
data/mate-system-monitor-1.24.1/src/bacon-message-connection.c:254:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy (uaddr.sun_path, conn->path,
data/mate-system-monitor-1.24.1/src/bacon-message-connection.c:255:18:  [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).
            MIN (strlen(conn->path)+1, UNIX_PATH_MAX));
data/mate-system-monitor-1.24.1/src/bacon-message-connection.c:275:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy (uaddr.sun_path, conn->path,
data/mate-system-monitor-1.24.1/src/bacon-message-connection.c:276: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).
            MIN(strlen(conn->path)+1, UNIX_PATH_MAX));
data/mate-system-monitor-1.24.1/src/bacon-message-connection.c:383:52:  [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).
    g_io_channel_write_chars (conn->chan, message, strlen (message),
data/mate-system-monitor-1.24.1/src/cgroups.cpp:52: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).
        tmp_size = strlen(*current_cgroup_name) + strlen(controller) + 1;
data/mate-system-monitor-1.24.1/src/cgroups.cpp:52:51:  [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).
        tmp_size = strlen(*current_cgroup_name) + strlen(controller) + 1;
data/mate-system-monitor-1.24.1/src/cgroups.cpp:53: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).
        paren_offset = g_strstr_len(tmp + strlen(path), -1, ")") - *current_cgroup_name;
data/mate-system-monitor-1.24.1/src/cgroups.cpp:115: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).
            tmp = found + strlen(controller);
data/mate-system-monitor-1.24.1/src/cgroups.cpp:122: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).
            found = found + strlen(path);
data/mate-system-monitor-1.24.1/src/sysinfo.cpp:484:61:  [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).
                    this->distro_release = s.substr(found + strlen("OpenIndiana "));
data/mate-system-monitor-1.24.1/src/sysinfo.cpp:683: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).
                        start = strlen("NAME=");
data/mate-system-monitor-1.24.1/src/sysinfo.cpp:690: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).
                        start = strlen("VERSION=");
data/mate-system-monitor-1.24.1/src/sysinfo.cpp:694: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).
                        start = strlen("# VERSION=");
data/mate-system-monitor-1.24.1/src/sysinfo.cpp:731: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).
                        len = strlen("DESCRIPTION=");

ANALYSIS SUMMARY:

Hits = 37
Lines analyzed = 12552 in approximately 0.27 seconds (46035 lines/second)
Physical Source Lines of Code (SLOC) = 9158
Hits@level = [0]   1 [1]  18 [2]  11 [3]   1 [4]   7 [5]   0
Hits@level+ = [0+]  38 [1+]  37 [2+]  19 [3+]   8 [4+]   7 [5+]   0
Hits/KSLOC@level+ = [0+] 4.14938 [1+] 4.04018 [2+] 2.07469 [3+] 0.873553 [4+] 0.764359 [5+]   0
Dot directories skipped = 3 (--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.