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-monitor-3.38.0/scripts/gsm_execute_helper.c
Examining data/gnome-system-monitor-3.38.0/src/application.cpp
Examining data/gnome-system-monitor-3.38.0/src/application.h
Examining data/gnome-system-monitor-3.38.0/src/argv.cpp
Examining data/gnome-system-monitor-3.38.0/src/argv.h
Examining data/gnome-system-monitor-3.38.0/src/cgroups.cpp
Examining data/gnome-system-monitor-3.38.0/src/cgroups.h
Examining data/gnome-system-monitor-3.38.0/src/defaulttable.h
Examining data/gnome-system-monitor-3.38.0/src/disks.cpp
Examining data/gnome-system-monitor-3.38.0/src/disks.h
Examining data/gnome-system-monitor-3.38.0/src/gsm_gksu.cpp
Examining data/gnome-system-monitor-3.38.0/src/gsm_gksu.h
Examining data/gnome-system-monitor-3.38.0/src/gsm_gnomesu.cpp
Examining data/gnome-system-monitor-3.38.0/src/gsm_gnomesu.h
Examining data/gnome-system-monitor-3.38.0/src/gsm_pkexec.cpp
Examining data/gnome-system-monitor-3.38.0/src/gsm_pkexec.h
Examining data/gnome-system-monitor-3.38.0/src/interface.cpp
Examining data/gnome-system-monitor-3.38.0/src/interface.h
Examining data/gnome-system-monitor-3.38.0/src/legacy/e_date.c
Examining data/gnome-system-monitor-3.38.0/src/legacy/e_date.h
Examining data/gnome-system-monitor-3.38.0/src/legacy/gsm_color_button.c
Examining data/gnome-system-monitor-3.38.0/src/legacy/gsm_color_button.h
Examining data/gnome-system-monitor-3.38.0/src/legacy/treeview.c
Examining data/gnome-system-monitor-3.38.0/src/legacy/treeview.h
Examining data/gnome-system-monitor-3.38.0/src/load-graph.cpp
Examining data/gnome-system-monitor-3.38.0/src/load-graph.h
Examining data/gnome-system-monitor-3.38.0/src/lsof.cpp
Examining data/gnome-system-monitor-3.38.0/src/lsof.h
Examining data/gnome-system-monitor-3.38.0/src/main.cpp
Examining data/gnome-system-monitor-3.38.0/src/memmaps.cpp
Examining data/gnome-system-monitor-3.38.0/src/memmaps.h
Examining data/gnome-system-monitor-3.38.0/src/openfiles.cpp
Examining data/gnome-system-monitor-3.38.0/src/openfiles.h
Examining data/gnome-system-monitor-3.38.0/src/prefsdialog.cpp
Examining data/gnome-system-monitor-3.38.0/src/prefsdialog.h
Examining data/gnome-system-monitor-3.38.0/src/prettytable.cpp
Examining data/gnome-system-monitor-3.38.0/src/prettytable.h
Examining data/gnome-system-monitor-3.38.0/src/procactions.cpp
Examining data/gnome-system-monitor-3.38.0/src/procactions.h
Examining data/gnome-system-monitor-3.38.0/src/procdialogs.cpp
Examining data/gnome-system-monitor-3.38.0/src/procdialogs.h
Examining data/gnome-system-monitor-3.38.0/src/procproperties.cpp
Examining data/gnome-system-monitor-3.38.0/src/procproperties.h
Examining data/gnome-system-monitor-3.38.0/src/proctable.cpp
Examining data/gnome-system-monitor-3.38.0/src/proctable.h
Examining data/gnome-system-monitor-3.38.0/src/selinux.cpp
Examining data/gnome-system-monitor-3.38.0/src/selinux.h
Examining data/gnome-system-monitor-3.38.0/src/settings-keys.h
Examining data/gnome-system-monitor-3.38.0/src/smooth_refresh.cpp
Examining data/gnome-system-monitor-3.38.0/src/smooth_refresh.h
Examining data/gnome-system-monitor-3.38.0/src/systemd.cpp
Examining data/gnome-system-monitor-3.38.0/src/systemd.h
Examining data/gnome-system-monitor-3.38.0/src/util.cpp
Examining data/gnome-system-monitor-3.38.0/src/util.h

FINAL RESULTS:

data/gnome-system-monitor-3.38.0/scripts/gsm_execute_helper.c:12:10:  [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/gnome-system-monitor-3.38.0/src/systemd.cpp:21:9:  [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.
    if (access("/run/systemd/seats/", F_OK) >= 0) {
data/gnome-system-monitor-3.38.0/scripts/gsm_execute_helper.c:10: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/gnome-system-monitor-3.38.0/src/legacy/e_date.c:66: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 buf[10];
data/gnome-system-monitor-3.38.0/src/legacy/e_date.c:137: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(s, buf, sz);
data/gnome-system-monitor-3.38.0/src/legacy/e_date.c:151: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 buf[26];
data/gnome-system-monitor-3.38.0/src/load-graph.cpp:841:13:  [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], GsmApplication::get()->config.cpu_color,
data/gnome-system-monitor-3.38.0/src/memmaps.cpp:60: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/gnome-system-monitor-3.38.0/src/memmaps.cpp:170: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/gnome-system-monitor-3.38.0/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 hostname[NI_MAXHOST];
data/gnome-system-monitor-3.38.0/src/openfiles.cpp:62: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/gnome-system-monitor-3.38.0/src/openfiles.cpp:63: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/gnome-system-monitor-3.38.0/src/proctable.cpp:690: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/gnome-system-monitor-3.38.0/src/proctable.cpp:901: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 buf[40] = {0};
data/gnome-system-monitor-3.38.0/src/proctable.cpp:275:23:  [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 (match && (strlen (search_text) > 0)) {

ANALYSIS SUMMARY:

Hits = 15
Lines analyzed = 10469 in approximately 0.27 seconds (39011 lines/second)
Physical Source Lines of Code (SLOC) = 7615
Hits@level = [0]   1 [1]   1 [2]  12 [3]   0 [4]   2 [5]   0
Hits@level+ = [0+]  16 [1+]  15 [2+]  14 [3+]   2 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 2.10112 [1+] 1.9698 [2+] 1.83848 [3+] 0.26264 [4+] 0.26264 [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.