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/kcachegrind-20.08.0/libcore/eventtype.cpp
Examining data/kcachegrind-20.08.0/libcore/globalconfig.cpp
Examining data/kcachegrind-20.08.0/libcore/costitem.h
Examining data/kcachegrind-20.08.0/libcore/loader.h
Examining data/kcachegrind-20.08.0/libcore/subcost.cpp
Examining data/kcachegrind-20.08.0/libcore/fixcost.cpp
Examining data/kcachegrind-20.08.0/libcore/loader.cpp
Examining data/kcachegrind-20.08.0/libcore/tracedata.h
Examining data/kcachegrind-20.08.0/libcore/stackbrowser.h
Examining data/kcachegrind-20.08.0/libcore/utils.h
Examining data/kcachegrind-20.08.0/libcore/pool.cpp
Examining data/kcachegrind-20.08.0/libcore/subcost.h
Examining data/kcachegrind-20.08.0/libcore/addr.h
Examining data/kcachegrind-20.08.0/libcore/stackbrowser.cpp
Examining data/kcachegrind-20.08.0/libcore/addr.cpp
Examining data/kcachegrind-20.08.0/libcore/config.h
Examining data/kcachegrind-20.08.0/libcore/context.cpp
Examining data/kcachegrind-20.08.0/libcore/utils.cpp
Examining data/kcachegrind-20.08.0/libcore/eventtype.h
Examining data/kcachegrind-20.08.0/libcore/logger.cpp
Examining data/kcachegrind-20.08.0/libcore/pool.h
Examining data/kcachegrind-20.08.0/libcore/costitem.cpp
Examining data/kcachegrind-20.08.0/libcore/coverage.cpp
Examining data/kcachegrind-20.08.0/libcore/coverage.h
Examining data/kcachegrind-20.08.0/libcore/cachegrindloader.cpp
Examining data/kcachegrind-20.08.0/libcore/globalconfig.h
Examining data/kcachegrind-20.08.0/libcore/context.h
Examining data/kcachegrind-20.08.0/libcore/tracedata.cpp
Examining data/kcachegrind-20.08.0/libcore/config.cpp
Examining data/kcachegrind-20.08.0/libcore/fixcost.h
Examining data/kcachegrind-20.08.0/libcore/logger.h
Examining data/kcachegrind-20.08.0/kcachegrind/configdlg.cpp
Examining data/kcachegrind-20.08.0/kcachegrind/configdlg.h
Examining data/kcachegrind-20.08.0/kcachegrind/dumpmanager.h
Examining data/kcachegrind-20.08.0/kcachegrind/dumpselection.h
Examining data/kcachegrind-20.08.0/kcachegrind/kdeconfig.h
Examining data/kcachegrind-20.08.0/kcachegrind/main.cpp
Examining data/kcachegrind-20.08.0/kcachegrind/toplevel.h
Examining data/kcachegrind-20.08.0/kcachegrind/dumpmanager.cpp
Examining data/kcachegrind-20.08.0/kcachegrind/toplevel.cpp
Examining data/kcachegrind-20.08.0/kcachegrind/dumpselection.cpp
Examining data/kcachegrind-20.08.0/kcachegrind/kdeconfig.cpp
Examining data/kcachegrind-20.08.0/libviews/partselection.cpp
Examining data/kcachegrind-20.08.0/libviews/sourceitem.h
Examining data/kcachegrind-20.08.0/libviews/globalguiconfig.h
Examining data/kcachegrind-20.08.0/libviews/tabview.h
Examining data/kcachegrind-20.08.0/libviews/stackselection.h
Examining data/kcachegrind-20.08.0/libviews/coverageview.cpp
Examining data/kcachegrind-20.08.0/libviews/costlistitem.cpp
Examining data/kcachegrind-20.08.0/libviews/functionselection.cpp
Examining data/kcachegrind-20.08.0/libviews/listutils.h
Examining data/kcachegrind-20.08.0/libviews/partselection.h
Examining data/kcachegrind-20.08.0/libviews/stackitem.cpp
Examining data/kcachegrind-20.08.0/libviews/partgraph.cpp
Examining data/kcachegrind-20.08.0/libviews/toplevelbase.cpp
Examining data/kcachegrind-20.08.0/libviews/listutils.cpp
Examining data/kcachegrind-20.08.0/libviews/stackselection.cpp
Examining data/kcachegrind-20.08.0/libviews/functionselection.h
Examining data/kcachegrind-20.08.0/libviews/partlistitem.cpp
Examining data/kcachegrind-20.08.0/libviews/multiview.cpp
Examining data/kcachegrind-20.08.0/libviews/eventtypeview.cpp
Examining data/kcachegrind-20.08.0/libviews/callgraphview.cpp
Examining data/kcachegrind-20.08.0/libviews/multiview.h
Examining data/kcachegrind-20.08.0/libviews/eventtypeitem.cpp
Examining data/kcachegrind-20.08.0/libviews/partview.cpp
Examining data/kcachegrind-20.08.0/libviews/eventtypeview.h
Examining data/kcachegrind-20.08.0/libviews/instritem.cpp
Examining data/kcachegrind-20.08.0/libviews/coverageitem.h
Examining data/kcachegrind-20.08.0/libviews/callgraphview.h
Examining data/kcachegrind-20.08.0/libviews/partlistitem.h
Examining data/kcachegrind-20.08.0/libviews/coverageview.h
Examining data/kcachegrind-20.08.0/libviews/callview.h
Examining data/kcachegrind-20.08.0/libviews/callitem.cpp
Examining data/kcachegrind-20.08.0/libviews/functionlistmodel.h
Examining data/kcachegrind-20.08.0/libviews/instrview.h
Examining data/kcachegrind-20.08.0/libviews/traceitemview.cpp
Examining data/kcachegrind-20.08.0/libviews/globalguiconfig.cpp
Examining data/kcachegrind-20.08.0/libviews/sourceview.h
Examining data/kcachegrind-20.08.0/libviews/callitem.h
Examining data/kcachegrind-20.08.0/libviews/coverageitem.cpp
Examining data/kcachegrind-20.08.0/libviews/partview.h
Examining data/kcachegrind-20.08.0/libviews/tabview.cpp
Examining data/kcachegrind-20.08.0/libviews/stackitem.h
Examining data/kcachegrind-20.08.0/libviews/treemap.h
Examining data/kcachegrind-20.08.0/libviews/sourceview.cpp
Examining data/kcachegrind-20.08.0/libviews/instritem.h
Examining data/kcachegrind-20.08.0/libviews/callview.cpp
Examining data/kcachegrind-20.08.0/libviews/callmapview.cpp
Examining data/kcachegrind-20.08.0/libviews/instrview.cpp
Examining data/kcachegrind-20.08.0/libviews/sourceitem.cpp
Examining data/kcachegrind-20.08.0/libviews/partgraph.h
Examining data/kcachegrind-20.08.0/libviews/toplevelbase.h
Examining data/kcachegrind-20.08.0/libviews/traceitemview.h
Examining data/kcachegrind-20.08.0/libviews/costlistitem.h
Examining data/kcachegrind-20.08.0/libviews/treemap.cpp
Examining data/kcachegrind-20.08.0/libviews/functionlistmodel.cpp
Examining data/kcachegrind-20.08.0/libviews/eventtypeitem.h
Examining data/kcachegrind-20.08.0/libviews/callmapview.h
Examining data/kcachegrind-20.08.0/cgview/main.cpp
Examining data/kcachegrind-20.08.0/qcachegrind/configdialog.h
Examining data/kcachegrind-20.08.0/qcachegrind/configdialog.cpp
Examining data/kcachegrind-20.08.0/qcachegrind/qcgconfig.cpp
Examining data/kcachegrind-20.08.0/qcachegrind/generalsettings.cpp
Examining data/kcachegrind-20.08.0/qcachegrind/sourcesettings.cpp
Examining data/kcachegrind-20.08.0/qcachegrind/configpage.h
Examining data/kcachegrind-20.08.0/qcachegrind/qtcolorbutton.cpp
Examining data/kcachegrind-20.08.0/qcachegrind/qcgtoplevel.cpp
Examining data/kcachegrind-20.08.0/qcachegrind/configpage.cpp
Examining data/kcachegrind-20.08.0/qcachegrind/qcgmain.cpp
Examining data/kcachegrind-20.08.0/qcachegrind/qcgconfig.h
Examining data/kcachegrind-20.08.0/qcachegrind/generalsettings.h
Examining data/kcachegrind-20.08.0/qcachegrind/sourcesettings.h
Examining data/kcachegrind-20.08.0/qcachegrind/colorsettings.cpp
Examining data/kcachegrind-20.08.0/qcachegrind/qcgtoplevel.h
Examining data/kcachegrind-20.08.0/qcachegrind/colorsettings.h
Examining data/kcachegrind-20.08.0/qcachegrind/qtcolorbutton.h

FINAL RESULTS:

data/kcachegrind-20.08.0/kcachegrind/toplevel.cpp:1085:11:  [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.
    if (::system(QFile::encodeName( cmd ))<0)
data/kcachegrind-20.08.0/qcachegrind/qcgtoplevel.cpp:909:11:  [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.
    if (::system(QFile::encodeName( cmd ))<0)
data/kcachegrind-20.08.0/kcachegrind/toplevel.cpp:483:31:  [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).
    action = KStandardAction::open(this, SLOT(load()), actionCollection());
data/kcachegrind-20.08.0/kcachegrind/toplevel.cpp:924:22:  [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).
    else if (tmpFile.open()){
data/kcachegrind-20.08.0/kcachegrind/toplevel.cpp:992:22:  [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).
    else if (tmpFile.open()){
data/kcachegrind-20.08.0/libcore/cachegrindloader.cpp:160: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[2048];
data/kcachegrind-20.08.0/libcore/pool.cpp:33: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 space[1];
data/kcachegrind-20.08.0/libcore/pool.cpp:216: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((char*)pnew + 8, (char*)p + 8, len-8);
data/kcachegrind-20.08.0/libcore/tracedata.cpp:3191:18:  [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 (!device->open( QIODevice::ReadOnly ) ) {
data/kcachegrind-20.08.0/libcore/utils.cpp:352:35:  [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 (!file->isOpen() && !file->open( QIODevice::ReadOnly ) ) {
data/kcachegrind-20.08.0/libcore/utils.cpp:425: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 tmp[200];
data/kcachegrind-20.08.0/libviews/callgraphview.cpp:596:19:  [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).
        _tmpFile->open();
data/kcachegrind-20.08.0/libviews/callgraphview.cpp:680:25:  [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 ( !file->open(QIODevice::WriteOnly ) ) {
data/kcachegrind-20.08.0/libviews/instrview.cpp:881: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[BUF_SIZE];
data/kcachegrind-20.08.0/libviews/sourceview.cpp:742: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[160];
data/kcachegrind-20.08.0/libviews/sourceview.cpp:753:15:  [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 (!file.open(QIODevice::ReadOnly)) return;
data/kcachegrind-20.08.0/libviews/sourceview.cpp:769: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 buf2[32];
data/kcachegrind-20.08.0/libviews/sourceview.cpp:826:17:  [2] (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). Risk is low because the source is a constant string.
                strcpy(buf,"...");
data/kcachegrind-20.08.0/libcore/cachegrindloader.cpp:161:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int read = file->read(buf,2047);
data/kcachegrind-20.08.0/libcore/cachegrindloader.cpp:162:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read < 0)
data/kcachegrind-20.08.0/libcore/cachegrindloader.cpp:164:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    buf[read] = 0;
data/kcachegrind-20.08.0/libcore/coverage.cpp:210: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).
           spaces+strlen(spaces)-d,
data/kcachegrind-20.08.0/libcore/coverage.cpp:220: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).
               spaces+strlen(spaces)-d,
data/kcachegrind-20.08.0/libcore/coverage.cpp:247: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).
               spaces+strlen(spaces)-d,
data/kcachegrind-20.08.0/libcore/coverage.cpp:284: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).
                       spaces+strlen(spaces)-d,
data/kcachegrind-20.08.0/libcore/coverage.cpp:299: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).
                       spaces+strlen(spaces)-d,
data/kcachegrind-20.08.0/libcore/utils.cpp:428:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(tmp, _current, l);
data/kcachegrind-20.08.0/libviews/instrview.cpp:165: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).
    int operandsLen = strlen(buf + pos);

ANALYSIS SUMMARY:

Hits = 28
Lines analyzed = 41619 in approximately 0.91 seconds (45549 lines/second)
Physical Source Lines of Code (SLOC) = 28688
Hits@level = [0]   0 [1]  10 [2]  16 [3]   0 [4]   2 [5]   0
Hits@level+ = [0+]  28 [1+]  28 [2+]  18 [3+]   2 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 0.976018 [1+] 0.976018 [2+] 0.62744 [3+] 0.0697156 [4+] 0.0697156 [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.