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/nload-0.7.4/src/device.h
Examining data/nload-0.7.4/src/traffic_window.h
Examining data/nload-0.7.4/src/devreader-bsd.cpp
Examining data/nload-0.7.4/src/devreader-linux.h
Examining data/nload-0.7.4/src/form_field.cpp
Examining data/nload-0.7.4/src/stringutils.cpp
Examining data/nload-0.7.4/src/main.h
Examining data/nload-0.7.4/src/graph.cpp
Examining data/nload-0.7.4/src/window.h
Examining data/nload-0.7.4/src/window.cpp
Examining data/nload-0.7.4/src/settingstore.h
Examining data/nload-0.7.4/src/device.cpp
Examining data/nload-0.7.4/src/devreader-solaris.cpp
Examining data/nload-0.7.4/src/devreader-hpux.cpp
Examining data/nload-0.7.4/src/screen.h
Examining data/nload-0.7.4/src/devreaderfactory.cpp
Examining data/nload-0.7.4/src/statistics.h
Examining data/nload-0.7.4/src/devreader-linux-sys.cpp
Examining data/nload-0.7.4/src/devreader-linux.cpp
Examining data/nload-0.7.4/src/stringutils.h
Examining data/nload-0.7.4/src/main.cpp
Examining data/nload-0.7.4/src/graph.h
Examining data/nload-0.7.4/src/settingstore.cpp
Examining data/nload-0.7.4/src/screen.cpp
Examining data/nload-0.7.4/src/devreader.h
Examining data/nload-0.7.4/src/traffic_window.cpp
Examining data/nload-0.7.4/src/dataframe.h
Examining data/nload-0.7.4/src/setting.h
Examining data/nload-0.7.4/src/setting.cpp
Examining data/nload-0.7.4/src/devreader-linux-proc.h
Examining data/nload-0.7.4/src/devreader.cpp
Examining data/nload-0.7.4/src/form_field.h
Examining data/nload-0.7.4/src/devreader-bsd.h
Examining data/nload-0.7.4/src/settingfilter.h
Examining data/nload-0.7.4/src/statistics.cpp
Examining data/nload-0.7.4/src/opt_window.h
Examining data/nload-0.7.4/src/devreader-linux-sys.h
Examining data/nload-0.7.4/src/devreader-linux-proc.cpp
Examining data/nload-0.7.4/src/devreaderfactory.h
Examining data/nload-0.7.4/src/devreader-solaris.h
Examining data/nload-0.7.4/src/settingfilter.cpp
Examining data/nload-0.7.4/src/opt_window.cpp
Examining data/nload-0.7.4/src/devreader-hpux.h

FINAL RESULTS:

data/nload-0.7.4/src/main.cpp:115: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 char* homeDirArray = getenv("HOME");
data/nload-0.7.4/src/setting.cpp:125:16:  [3] (random) setstate:
  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.
            in.setstate(ios_base::failbit);
data/nload-0.7.4/src/devreader-hpux.cpp:109:14:  [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).
    if((fd = open("/dev/dlpi", O_RDWR)) < 0)
data/nload-0.7.4/src/devreader-hpux.cpp:145: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((u_char*) ppa_area, (u_char*) ctrl_area + ppa_ack->dl_offset, ppa_ack->dl_length);
data/nload-0.7.4/src/devreader-hpux.cpp:184:14:  [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).
    if((fd = open("/dev/dlpi", O_RDWR)) < 0)
data/nload-0.7.4/src/devreader-hpux.cpp:220: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((u_char*) ppa_area, (u_char*) ctrl_area + ppa_ack->dl_offset, ppa_ack->dl_length);
data/nload-0.7.4/src/main.cpp:143:27:  [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).
                setting = atoi(argv[ i + 1 ]);
data/nload-0.7.4/src/main.cpp:164:27:  [2] (integer) atol:
  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).
                setting = atol(argv[ i + 1 ]);
data/nload-0.7.4/src/main.cpp:185:27:  [2] (integer) atol:
  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).
                setting = atol(argv[ i + 1 ]);
data/nload-0.7.4/src/main.cpp:205:27:  [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).
                setting = atoi(argv[ i + 1 ]);
data/nload-0.7.4/src/devreader-solaris.cpp:69:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(devName, m_deviceName.c_str(), m_deviceName.length());
data/nload-0.7.4/src/devreader.cpp:87:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(ifr.ifr_name, m_deviceName.c_str(), IFNAMSIZ - 1);

ANALYSIS SUMMARY:

Hits = 12
Lines analyzed = 5008 in approximately 0.12 seconds (41952 lines/second)
Physical Source Lines of Code (SLOC) = 3188
Hits@level = [0]   4 [1]   2 [2]   8 [3]   2 [4]   0 [5]   0
Hits@level+ = [0+]  16 [1+]  12 [2+]  10 [3+]   2 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 5.01882 [1+] 3.76412 [2+] 3.13676 [3+] 0.627353 [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.