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/libqapt-3.0.5/autotests/dependencyinfotest.cpp
Examining data/libqapt-3.0.5/autotests/sourceslisttest.cpp
Examining data/libqapt-3.0.5/autotests/sourceslisttest.h
Examining data/libqapt-3.0.5/autotests/transactionerrorhandlingtest.cpp
Examining data/libqapt-3.0.5/autotests/transactionerrorhandlingtest.h
Examining data/libqapt-3.0.5/example/cacheupdatewidget.cpp
Examining data/libqapt-3.0.5/example/cacheupdatewidget.h
Examining data/libqapt-3.0.5/example/commitwidget.cpp
Examining data/libqapt-3.0.5/example/commitwidget.h
Examining data/libqapt-3.0.5/example/main.cpp
Examining data/libqapt-3.0.5/example/qapttest.cpp
Examining data/libqapt-3.0.5/example/qapttest.h
Examining data/libqapt-3.0.5/src/backend.cpp
Examining data/libqapt-3.0.5/src/backend.h
Examining data/libqapt-3.0.5/src/cache.cpp
Examining data/libqapt-3.0.5/src/cache.h
Examining data/libqapt-3.0.5/src/changelog.cpp
Examining data/libqapt-3.0.5/src/changelog.h
Examining data/libqapt-3.0.5/src/config.cpp
Examining data/libqapt-3.0.5/src/config.h
Examining data/libqapt-3.0.5/src/debfile.cpp
Examining data/libqapt-3.0.5/src/debfile.h
Examining data/libqapt-3.0.5/src/dependencyinfo.cpp
Examining data/libqapt-3.0.5/src/dependencyinfo.h
Examining data/libqapt-3.0.5/src/downloadprogress.cpp
Examining data/libqapt-3.0.5/src/downloadprogress.h
Examining data/libqapt-3.0.5/src/globals.h
Examining data/libqapt-3.0.5/src/history.cpp
Examining data/libqapt-3.0.5/src/history.h
Examining data/libqapt-3.0.5/src/markingerrorinfo.cpp
Examining data/libqapt-3.0.5/src/markingerrorinfo.h
Examining data/libqapt-3.0.5/src/package.cpp
Examining data/libqapt-3.0.5/src/package.h
Examining data/libqapt-3.0.5/src/sourceentry.cpp
Examining data/libqapt-3.0.5/src/sourceentry.h
Examining data/libqapt-3.0.5/src/sourceslist.cpp
Examining data/libqapt-3.0.5/src/sourceslist.h
Examining data/libqapt-3.0.5/src/transaction.cpp
Examining data/libqapt-3.0.5/src/transaction.h
Examining data/libqapt-3.0.5/src/worker/aptlock.cpp
Examining data/libqapt-3.0.5/src/worker/aptlock.h
Examining data/libqapt-3.0.5/src/worker/aptworker.cpp
Examining data/libqapt-3.0.5/src/worker/aptworker.h
Examining data/libqapt-3.0.5/src/worker/main.cpp
Examining data/libqapt-3.0.5/src/worker/qaptauthorization.h
Examining data/libqapt-3.0.5/src/worker/transaction.cpp
Examining data/libqapt-3.0.5/src/worker/transaction.h
Examining data/libqapt-3.0.5/src/worker/transactionqueue.cpp
Examining data/libqapt-3.0.5/src/worker/transactionqueue.h
Examining data/libqapt-3.0.5/src/worker/workeracquire.cpp
Examining data/libqapt-3.0.5/src/worker/workeracquire.h
Examining data/libqapt-3.0.5/src/worker/workerdaemon.cpp
Examining data/libqapt-3.0.5/src/worker/workerdaemon.h
Examining data/libqapt-3.0.5/src/worker/workerinstallprogress.cpp
Examining data/libqapt-3.0.5/src/worker/workerinstallprogress.h
Examining data/libqapt-3.0.5/utils/plasma-runner-installer/installerrunner.cpp
Examining data/libqapt-3.0.5/utils/plasma-runner-installer/installerrunner.h
Examining data/libqapt-3.0.5/utils/qapt-batch/detailswidget.cpp
Examining data/libqapt-3.0.5/utils/qapt-batch/detailswidget.h
Examining data/libqapt-3.0.5/utils/qapt-batch/main.cpp
Examining data/libqapt-3.0.5/utils/qapt-batch/qaptbatch.cpp
Examining data/libqapt-3.0.5/utils/qapt-batch/qaptbatch.h
Examining data/libqapt-3.0.5/utils/qapt-deb-installer/ChangesDialog.cpp
Examining data/libqapt-3.0.5/utils/qapt-deb-installer/ChangesDialog.h
Examining data/libqapt-3.0.5/utils/qapt-deb-installer/DebCommitWidget.cpp
Examining data/libqapt-3.0.5/utils/qapt-deb-installer/DebCommitWidget.h
Examining data/libqapt-3.0.5/utils/qapt-deb-installer/DebInstaller.cpp
Examining data/libqapt-3.0.5/utils/qapt-deb-installer/DebInstaller.h
Examining data/libqapt-3.0.5/utils/qapt-deb-installer/DebViewer.cpp
Examining data/libqapt-3.0.5/utils/qapt-deb-installer/DebViewer.h
Examining data/libqapt-3.0.5/utils/qapt-deb-installer/main.cpp
Examining data/libqapt-3.0.5/utils/qapt-deb-thumbnailer/DebThumbnailer.cpp
Examining data/libqapt-3.0.5/utils/qapt-deb-thumbnailer/DebThumbnailer.h
Examining data/libqapt-3.0.5/utils/qapt-gst-helper/GstMatcher.cpp
Examining data/libqapt-3.0.5/utils/qapt-gst-helper/GstMatcher.h
Examining data/libqapt-3.0.5/utils/qapt-gst-helper/PluginFinder.cpp
Examining data/libqapt-3.0.5/utils/qapt-gst-helper/PluginFinder.h
Examining data/libqapt-3.0.5/utils/qapt-gst-helper/PluginHelper.cpp
Examining data/libqapt-3.0.5/utils/qapt-gst-helper/PluginHelper.h
Examining data/libqapt-3.0.5/utils/qapt-gst-helper/PluginInfo.cpp
Examining data/libqapt-3.0.5/utils/qapt-gst-helper/PluginInfo.h
Examining data/libqapt-3.0.5/utils/qapt-gst-helper/main.cpp

FINAL RESULTS:

data/libqapt-3.0.5/src/worker/workerinstallprogress.cpp:226:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(line, buf);
data/libqapt-3.0.5/src/backend.cpp:141:21:  [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 (distro_info.open(QFile::ReadOnly)) {
data/libqapt-3.0.5/src/backend.cpp:199: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::WriteOnly | QFile::Text)) {
data/libqapt-3.0.5/src/backend.cpp:251:20:  [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 (!d->cache->open()) {
data/libqapt-3.0.5/src/backend.cpp:382: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).
    if (!lsb_release.open(QFile::ReadOnly)) {
data/libqapt-3.0.5/src/backend.cpp:1246: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/libqapt-3.0.5/src/backend.cpp:1365: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/libqapt-3.0.5/src/backend.cpp:1514:27:  [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 (!tempFile.open()) {
data/libqapt-3.0.5/src/backend.cpp:1548:27:  [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 (!tempFile.open()) {
data/libqapt-3.0.5/src/cache.cpp:60:13:  [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).
bool Cache::open()
data/libqapt-3.0.5/src/cache.h:86:10:  [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).
    bool open();
data/libqapt-3.0.5/src/config.cpp:125: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(QIODevice::ReadOnly | QIODevice::Text);
data/libqapt-3.0.5/src/debfile.cpp:223: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).
    if (!tempFile.open()) {
data/libqapt-3.0.5/src/debfile.cpp:360: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).
    if (!tempFile.open()) {
data/libqapt-3.0.5/src/history.cpp:258:33:  [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 (historyFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
data/libqapt-3.0.5/src/package.cpp:443: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 (infoFile.open(QFile::ReadOnly)) {
data/libqapt-3.0.5/src/package.cpp:791: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::ReadOnly | QIODevice::Text)) {
data/libqapt-3.0.5/src/sourceslist.cpp:112: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::Text | QIODevice::ReadOnly)) {
data/libqapt-3.0.5/src/worker/workerdaemon.cpp:164: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 (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
data/libqapt-3.0.5/src/worker/workerinstallprogress.cpp:129: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 masterbuf[1024];
data/libqapt-3.0.5/src/worker/workerinstallprogress.cpp:149: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[2];
data/libqapt-3.0.5/src/worker/workerinstallprogress.cpp:150:12:  [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.
    static char line[1024] = "";
data/libqapt-3.0.5/src/dependencyinfo.cpp:112:32:  [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).
    const char *stop = start + strlen(start);
data/libqapt-3.0.5/src/package.cpp:730:16:  [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 lenA = strlen(a);
data/libqapt-3.0.5/src/package.cpp:731:16:  [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 lenB = strlen(b);
data/libqapt-3.0.5/src/worker/aptworker.cpp:508:18:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
                 usleep(200000);
data/libqapt-3.0.5/src/worker/workeracquire.cpp:136:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(200000);
data/libqapt-3.0.5/src/worker/workerinstallprogress.cpp:132:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while(read(pty_master, masterbuf, sizeof(masterbuf)) > 0);
data/libqapt-3.0.5/src/worker/workerinstallprogress.cpp:153:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int len = read(fd, buf, 1);
data/libqapt-3.0.5/src/worker/workerinstallprogress.cpp:193:25:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
                        usleep(200000);
data/libqapt-3.0.5/src/worker/workerinstallprogress.cpp:230:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(1000000/30);

ANALYSIS SUMMARY:

Hits = 31
Lines analyzed = 18638 in approximately 0.52 seconds (35749 lines/second)
Physical Source Lines of Code (SLOC) = 11268
Hits@level = [0]   0 [1]   9 [2]  21 [3]   0 [4]   1 [5]   0
Hits@level+ = [0+]  31 [1+]  31 [2+]  22 [3+]   1 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 2.75115 [1+] 2.75115 [2+] 1.95243 [3+] 0.0887469 [4+] 0.0887469 [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.