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/flameshot-0.8.5/external/Qt-Color-Widgets/include/color_wheel.hpp
Examining data/flameshot-0.8.5/external/Qt-Color-Widgets/src/color_utils.cpp
Examining data/flameshot-0.8.5/external/Qt-Color-Widgets/src/color_utils.hpp
Examining data/flameshot-0.8.5/external/Qt-Color-Widgets/src/color_wheel.cpp
Examining data/flameshot-0.8.5/external/singleapplication/singleapplication.cpp
Examining data/flameshot-0.8.5/external/singleapplication/singleapplication.h
Examining data/flameshot-0.8.5/external/singleapplication/singleapplication_p.h
Examining data/flameshot-0.8.5/src/cli/commandargument.cpp
Examining data/flameshot-0.8.5/src/cli/commandargument.h
Examining data/flameshot-0.8.5/src/cli/commandlineparser.cpp
Examining data/flameshot-0.8.5/src/cli/commandlineparser.h
Examining data/flameshot-0.8.5/src/cli/commandoption.cpp
Examining data/flameshot-0.8.5/src/cli/commandoption.h
Examining data/flameshot-0.8.5/src/config/buttonlistview.cpp
Examining data/flameshot-0.8.5/src/config/buttonlistview.h
Examining data/flameshot-0.8.5/src/config/clickablelabel.cpp
Examining data/flameshot-0.8.5/src/config/clickablelabel.h
Examining data/flameshot-0.8.5/src/config/configwindow.cpp
Examining data/flameshot-0.8.5/src/config/configwindow.h
Examining data/flameshot-0.8.5/src/config/extendedslider.cpp
Examining data/flameshot-0.8.5/src/config/extendedslider.h
Examining data/flameshot-0.8.5/src/config/filenameeditor.cpp
Examining data/flameshot-0.8.5/src/config/filenameeditor.h
Examining data/flameshot-0.8.5/src/config/geneneralconf.cpp
Examining data/flameshot-0.8.5/src/config/geneneralconf.h
Examining data/flameshot-0.8.5/src/config/strftimechooserwidget.cpp
Examining data/flameshot-0.8.5/src/config/strftimechooserwidget.h
Examining data/flameshot-0.8.5/src/config/styleoverride.cpp
Examining data/flameshot-0.8.5/src/config/styleoverride.h
Examining data/flameshot-0.8.5/src/config/uicoloreditor.cpp
Examining data/flameshot-0.8.5/src/config/uicoloreditor.h
Examining data/flameshot-0.8.5/src/config/visualseditor.cpp
Examining data/flameshot-0.8.5/src/config/visualseditor.h
Examining data/flameshot-0.8.5/src/core/capturerequest.cpp
Examining data/flameshot-0.8.5/src/core/capturerequest.h
Examining data/flameshot-0.8.5/src/core/controller.cpp
Examining data/flameshot-0.8.5/src/core/controller.h
Examining data/flameshot-0.8.5/src/core/flameshotdbusadapter.cpp
Examining data/flameshot-0.8.5/src/core/flameshotdbusadapter.h
Examining data/flameshot-0.8.5/src/core/globalshortcutfilter.cpp
Examining data/flameshot-0.8.5/src/core/globalshortcutfilter.h
Examining data/flameshot-0.8.5/src/main.cpp
Examining data/flameshot-0.8.5/src/tools/abstractactiontool.cpp
Examining data/flameshot-0.8.5/src/tools/abstractactiontool.h
Examining data/flameshot-0.8.5/src/tools/abstractpathtool.cpp
Examining data/flameshot-0.8.5/src/tools/abstractpathtool.h
Examining data/flameshot-0.8.5/src/tools/abstracttwopointtool.cpp
Examining data/flameshot-0.8.5/src/tools/abstracttwopointtool.h
Examining data/flameshot-0.8.5/src/tools/arrow/arrowtool.cpp
Examining data/flameshot-0.8.5/src/tools/arrow/arrowtool.h
Examining data/flameshot-0.8.5/src/tools/capturecontext.cpp
Examining data/flameshot-0.8.5/src/tools/capturecontext.h
Examining data/flameshot-0.8.5/src/tools/capturetool.h
Examining data/flameshot-0.8.5/src/tools/circle/circletool.cpp
Examining data/flameshot-0.8.5/src/tools/circle/circletool.h
Examining data/flameshot-0.8.5/src/tools/circlecount/circlecounttool.cpp
Examining data/flameshot-0.8.5/src/tools/circlecount/circlecounttool.h
Examining data/flameshot-0.8.5/src/tools/copy/copytool.cpp
Examining data/flameshot-0.8.5/src/tools/copy/copytool.h
Examining data/flameshot-0.8.5/src/tools/exit/exittool.cpp
Examining data/flameshot-0.8.5/src/tools/exit/exittool.h
Examining data/flameshot-0.8.5/src/tools/imgur/imguruploader.cpp
Examining data/flameshot-0.8.5/src/tools/imgur/imguruploader.h
Examining data/flameshot-0.8.5/src/tools/imgur/imguruploadertool.cpp
Examining data/flameshot-0.8.5/src/tools/imgur/imguruploadertool.h
Examining data/flameshot-0.8.5/src/tools/launcher/applaunchertool.cpp
Examining data/flameshot-0.8.5/src/tools/launcher/applaunchertool.h
Examining data/flameshot-0.8.5/src/tools/launcher/applauncherwidget.cpp
Examining data/flameshot-0.8.5/src/tools/launcher/applauncherwidget.h
Examining data/flameshot-0.8.5/src/tools/launcher/launcheritemdelegate.cpp
Examining data/flameshot-0.8.5/src/tools/launcher/launcheritemdelegate.h
Examining data/flameshot-0.8.5/src/tools/launcher/openwithprogram.cpp
Examining data/flameshot-0.8.5/src/tools/launcher/openwithprogram.h
Examining data/flameshot-0.8.5/src/tools/launcher/terminallauncher.cpp
Examining data/flameshot-0.8.5/src/tools/launcher/terminallauncher.h
Examining data/flameshot-0.8.5/src/tools/line/linetool.cpp
Examining data/flameshot-0.8.5/src/tools/line/linetool.h
Examining data/flameshot-0.8.5/src/tools/marker/markertool.cpp
Examining data/flameshot-0.8.5/src/tools/marker/markertool.h
Examining data/flameshot-0.8.5/src/tools/move/movetool.cpp
Examining data/flameshot-0.8.5/src/tools/move/movetool.h
Examining data/flameshot-0.8.5/src/tools/pencil/penciltool.cpp
Examining data/flameshot-0.8.5/src/tools/pencil/penciltool.h
Examining data/flameshot-0.8.5/src/tools/pin/pintool.cpp
Examining data/flameshot-0.8.5/src/tools/pin/pintool.h
Examining data/flameshot-0.8.5/src/tools/pin/pinwidget.cpp
Examining data/flameshot-0.8.5/src/tools/pin/pinwidget.h
Examining data/flameshot-0.8.5/src/tools/pixelate/pixelatetool.cpp
Examining data/flameshot-0.8.5/src/tools/pixelate/pixelatetool.h
Examining data/flameshot-0.8.5/src/tools/rectangle/rectangletool.cpp
Examining data/flameshot-0.8.5/src/tools/rectangle/rectangletool.h
Examining data/flameshot-0.8.5/src/tools/redo/redotool.cpp
Examining data/flameshot-0.8.5/src/tools/redo/redotool.h
Examining data/flameshot-0.8.5/src/tools/save/savetool.cpp
Examining data/flameshot-0.8.5/src/tools/save/savetool.h
Examining data/flameshot-0.8.5/src/tools/selection/selectiontool.cpp
Examining data/flameshot-0.8.5/src/tools/selection/selectiontool.h
Examining data/flameshot-0.8.5/src/tools/sizeindicator/sizeindicatortool.cpp
Examining data/flameshot-0.8.5/src/tools/sizeindicator/sizeindicatortool.h
Examining data/flameshot-0.8.5/src/tools/text/textconfig.cpp
Examining data/flameshot-0.8.5/src/tools/text/textconfig.h
Examining data/flameshot-0.8.5/src/tools/text/texttool.cpp
Examining data/flameshot-0.8.5/src/tools/text/texttool.h
Examining data/flameshot-0.8.5/src/tools/text/textwidget.cpp
Examining data/flameshot-0.8.5/src/tools/text/textwidget.h
Examining data/flameshot-0.8.5/src/tools/toolfactory.cpp
Examining data/flameshot-0.8.5/src/tools/toolfactory.h
Examining data/flameshot-0.8.5/src/tools/undo/undotool.cpp
Examining data/flameshot-0.8.5/src/tools/undo/undotool.h
Examining data/flameshot-0.8.5/src/utils/colorutils.cpp
Examining data/flameshot-0.8.5/src/utils/colorutils.h
Examining data/flameshot-0.8.5/src/utils/confighandler.cpp
Examining data/flameshot-0.8.5/src/utils/confighandler.h
Examining data/flameshot-0.8.5/src/utils/dbusutils.cpp
Examining data/flameshot-0.8.5/src/utils/dbusutils.h
Examining data/flameshot-0.8.5/src/utils/desktopfileparse.cpp
Examining data/flameshot-0.8.5/src/utils/desktopfileparse.h
Examining data/flameshot-0.8.5/src/utils/desktopinfo.cpp
Examining data/flameshot-0.8.5/src/utils/desktopinfo.h
Examining data/flameshot-0.8.5/src/utils/filenamehandler.cpp
Examining data/flameshot-0.8.5/src/utils/filenamehandler.h
Examining data/flameshot-0.8.5/src/utils/globalvalues.cpp
Examining data/flameshot-0.8.5/src/utils/globalvalues.h
Examining data/flameshot-0.8.5/src/utils/pathinfo.cpp
Examining data/flameshot-0.8.5/src/utils/pathinfo.h
Examining data/flameshot-0.8.5/src/utils/screengrabber.cpp
Examining data/flameshot-0.8.5/src/utils/screengrabber.h
Examining data/flameshot-0.8.5/src/utils/screenshotsaver.cpp
Examining data/flameshot-0.8.5/src/utils/screenshotsaver.h
Examining data/flameshot-0.8.5/src/utils/systemnotification.cpp
Examining data/flameshot-0.8.5/src/utils/systemnotification.h
Examining data/flameshot-0.8.5/src/utils/waylandutils.cpp
Examining data/flameshot-0.8.5/src/utils/waylandutils.h
Examining data/flameshot-0.8.5/src/widgets/capture/buttonhandler.cpp
Examining data/flameshot-0.8.5/src/widgets/capture/buttonhandler.h
Examining data/flameshot-0.8.5/src/widgets/capture/capturebutton.cpp
Examining data/flameshot-0.8.5/src/widgets/capture/capturebutton.h
Examining data/flameshot-0.8.5/src/widgets/capture/capturetoolbutton.cpp
Examining data/flameshot-0.8.5/src/widgets/capture/capturetoolbutton.h
Examining data/flameshot-0.8.5/src/widgets/capture/capturewidget.cpp
Examining data/flameshot-0.8.5/src/widgets/capture/capturewidget.h
Examining data/flameshot-0.8.5/src/widgets/capture/colorpicker.cpp
Examining data/flameshot-0.8.5/src/widgets/capture/colorpicker.h
Examining data/flameshot-0.8.5/src/widgets/capture/hovereventfilter.cpp
Examining data/flameshot-0.8.5/src/widgets/capture/hovereventfilter.h
Examining data/flameshot-0.8.5/src/widgets/capture/modificationcommand.cpp
Examining data/flameshot-0.8.5/src/widgets/capture/modificationcommand.h
Examining data/flameshot-0.8.5/src/widgets/capture/notifierbox.cpp
Examining data/flameshot-0.8.5/src/widgets/capture/notifierbox.h
Examining data/flameshot-0.8.5/src/widgets/capture/selectionwidget.cpp
Examining data/flameshot-0.8.5/src/widgets/capture/selectionwidget.h
Examining data/flameshot-0.8.5/src/widgets/capturelauncher.cpp
Examining data/flameshot-0.8.5/src/widgets/capturelauncher.h
Examining data/flameshot-0.8.5/src/widgets/draggablewidgetmaker.cpp
Examining data/flameshot-0.8.5/src/widgets/draggablewidgetmaker.h
Examining data/flameshot-0.8.5/src/widgets/imagelabel.cpp
Examining data/flameshot-0.8.5/src/widgets/imagelabel.h
Examining data/flameshot-0.8.5/src/widgets/infowindow.cpp
Examining data/flameshot-0.8.5/src/widgets/infowindow.h
Examining data/flameshot-0.8.5/src/widgets/loadspinner.cpp
Examining data/flameshot-0.8.5/src/widgets/loadspinner.h
Examining data/flameshot-0.8.5/src/widgets/notificationwidget.cpp
Examining data/flameshot-0.8.5/src/widgets/notificationwidget.h
Examining data/flameshot-0.8.5/src/widgets/orientablepushbutton.cpp
Examining data/flameshot-0.8.5/src/widgets/orientablepushbutton.h
Examining data/flameshot-0.8.5/src/widgets/panel/sidepanelwidget.cpp
Examining data/flameshot-0.8.5/src/widgets/panel/sidepanelwidget.h
Examining data/flameshot-0.8.5/src/widgets/panel/utilitypanel.cpp
Examining data/flameshot-0.8.5/src/widgets/panel/utilitypanel.h

FINAL RESULTS:

data/flameshot-0.8.5/src/main.cpp:67:20:  [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.
          QLocale::system(),
data/flameshot-0.8.5/external/singleapplication/singleapplication.cpp:103:9:  [2] (buffer) wchar_t:
  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.
        wchar_t username[UNLEN + 1];
data/flameshot-0.8.5/src/config/geneneralconf.cpp:119: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(QFile::ReadOnly)) {
data/flameshot-0.8.5/src/config/geneneralconf.cpp:127:17:  [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 (!config.open(QFile::WriteOnly)) {
data/flameshot-0.8.5/src/utils/confighandler.cpp:323: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 (file.open(QIODevice::WriteOnly)) {
data/flameshot-0.8.5/src/utils/dbusutils.cpp:59: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).
        file.open(stdout, QIODevice::WriteOnly);
data/flameshot-0.8.5/src/utils/desktopfileparse.cpp:43: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 | QIODevice::Text)) {
data/flameshot-0.8.5/src/utils/filenamehandler.cpp:45: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 data[MAX_CHARACTERS] = { 0 };
data/flameshot-0.8.5/external/singleapplication/singleapplication.cpp:287:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          nextConnSocket->read(nextConnSocket->bytesAvailable() -
data/flameshot-0.8.5/external/singleapplication/singleapplication.cpp:289:52:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        QByteArray checksumBytes = nextConnSocket->read(sizeof(quint16));
data/flameshot-0.8.5/src/utils/filenamehandler.cpp:47:45:  [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).
    res = QString::fromLocal8Bit(data, (int)strlen(data));

ANALYSIS SUMMARY:

Hits = 11
Lines analyzed = 16435 in approximately 0.57 seconds (29009 lines/second)
Physical Source Lines of Code (SLOC) = 11196
Hits@level = [0]   0 [1]   3 [2]   7 [3]   0 [4]   1 [5]   0
Hits@level+ = [0+]  11 [1+]  11 [2+]   8 [3+]   1 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 0.982494 [1+] 0.982494 [2+] 0.714541 [3+] 0.0893176 [4+] 0.0893176 [5+]   0
Dot directories skipped = 2 (--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.