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/karchive-5.74.0/autotests/kfiltertest.cpp
Examining data/karchive-5.74.0/autotests/klimitediodevicetest.h
Examining data/karchive-5.74.0/autotests/kcompressiondevicetest.cpp
Examining data/karchive-5.74.0/autotests/deprecatedtest.cpp
Examining data/karchive-5.74.0/autotests/karchivetest.cpp
Examining data/karchive-5.74.0/autotests/kcompressiondevicetest.h
Examining data/karchive-5.74.0/autotests/kfiltertest.h
Examining data/karchive-5.74.0/autotests/klimitediodevicetest.cpp
Examining data/karchive-5.74.0/autotests/karchivetest.h
Examining data/karchive-5.74.0/test_package/example.cpp
Examining data/karchive-5.74.0/tests/krcctest.cpp
Examining data/karchive-5.74.0/tests/kartest.cpp
Examining data/karchive-5.74.0/tests/k7ziptest.cpp
Examining data/karchive-5.74.0/tests/ktartest.cpp
Examining data/karchive-5.74.0/tests/kziptest.cpp
Examining data/karchive-5.74.0/examples/unzipper/main.cpp
Examining data/karchive-5.74.0/examples/tarlocalfiles/main.cpp
Examining data/karchive-5.74.0/examples/bzip2gzip/main.cpp
Examining data/karchive-5.74.0/examples/helloworld/main.cpp
Examining data/karchive-5.74.0/src/kxzfilter.cpp
Examining data/karchive-5.74.0/src/k7zip.h
Examining data/karchive-5.74.0/src/kzip.cpp
Examining data/karchive-5.74.0/src/karchive.cpp
Examining data/karchive-5.74.0/src/krcc.cpp
Examining data/karchive-5.74.0/src/kcompressiondevice_p.h
Examining data/karchive-5.74.0/src/karchivefile.h
Examining data/karchive-5.74.0/src/knonefilter.cpp
Examining data/karchive-5.74.0/src/kbzip2filter.cpp
Examining data/karchive-5.74.0/src/kcompressiondevice.h
Examining data/karchive-5.74.0/src/kar.h
Examining data/karchive-5.74.0/src/klimitediodevice.cpp
Examining data/karchive-5.74.0/src/knonefilter.h
Examining data/karchive-5.74.0/src/karchive.h
Examining data/karchive-5.74.0/src/kxzfilter.h
Examining data/karchive-5.74.0/src/kfilterbase.h
Examining data/karchive-5.74.0/src/karchive_p.h
Examining data/karchive-5.74.0/src/kcompressiondevice.cpp
Examining data/karchive-5.74.0/src/kfilterdev.cpp
Examining data/karchive-5.74.0/src/k7zip.cpp
Examining data/karchive-5.74.0/src/karchiveentry.h
Examining data/karchive-5.74.0/src/karchivedirectory.h
Examining data/karchive-5.74.0/src/klimitediodevice_p.h
Examining data/karchive-5.74.0/src/kar.cpp
Examining data/karchive-5.74.0/src/kzip.h
Examining data/karchive-5.74.0/src/ktar.cpp
Examining data/karchive-5.74.0/src/kbzip2filter.h
Examining data/karchive-5.74.0/src/krcc.h
Examining data/karchive-5.74.0/src/kgzipfilter.cpp
Examining data/karchive-5.74.0/src/ktar.h
Examining data/karchive-5.74.0/src/kgzipfilter.h
Examining data/karchive-5.74.0/src/kzipfileentry.h
Examining data/karchive-5.74.0/src/kfilterbase.cpp
Examining data/karchive-5.74.0/src/kfilterdev.h

FINAL RESULTS:

data/karchive-5.74.0/autotests/karchivetest.cpp:323:15:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
    int len = readlink(encodedFileName.data(), s.data(), s.size() - 1);
data/karchive-5.74.0/src/karchive.cpp:301:19:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        int len = readlink(encodedFileName.data(), s.data(), s.size() - 1);
data/karchive-5.74.0/src/k7zip.cpp:158:57:  [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.
    K7ZipFileEntry(K7Zip *zip, const QString &name, int access, const QDateTime &date,
data/karchive-5.74.0/src/k7zip.cpp:187:69:  [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.
K7ZipFileEntry::K7ZipFileEntry(K7Zip *zip, const QString &name, int access, const QDateTime &date,
data/karchive-5.74.0/src/k7zip.cpp:190:31:  [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.
    : KArchiveFile(zip, name, access, date, user, group, symlink, pos, size)
data/karchive-5.74.0/src/k7zip.cpp:2640:13:  [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.
        int access;
data/karchive-5.74.0/src/k7zip.cpp:2644:18:  [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 & QT_STAT_MASK) == QT_STAT_LNK) {
data/karchive-5.74.0/src/k7zip.cpp:2684:60:  [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.
                e = new KArchiveDirectory(this, entryName, access, mTime, rootDir()->user(), rootDir()->group(), QString()/*symlink*/);
data/karchive-5.74.0/src/k7zip.cpp:2688:57:  [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.
                e = new K7ZipFileEntry(this, entryName, access, mTime, rootDir()->user(), rootDir()->group(), QString()/*symlink*/, pos, fileInfo->size, d->outData);
data/karchive-5.74.0/src/k7zip.cpp:2691:57:  [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.
                e = new K7ZipFileEntry(this, entryName, access, mTime, rootDir()->user(), rootDir()->group(), target, 0, 0, nullptr);
data/karchive-5.74.0/src/karchive.cpp:651:11:  [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.
        , access(_access)
data/karchive-5.74.0/src/karchive.cpp:660:12:  [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.
    mode_t access;
data/karchive-5.74.0/src/karchive.cpp:667:68:  [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.
KArchiveEntry::KArchiveEntry(KArchive *t, const QString &name, int access, const QDateTime &date,
data/karchive-5.74.0/src/karchive.cpp:670:43:  [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.
    : d(new KArchiveEntryPrivate(t, name, access, date, user, group, symlink))
data/karchive-5.74.0/src/karchive.cpp:691:15:  [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.
    return d->access;
data/karchive-5.74.0/src/karchive.cpp:740:66:  [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.
KArchiveFile::KArchiveFile(KArchive *t, const QString &name, int access, const QDateTime &date,
data/karchive-5.74.0/src/karchive.cpp:744:30:  [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.
    : KArchiveEntry(t, name, access, date, user, group, symlink)
data/karchive-5.74.0/src/karchive.cpp:848:76:  [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.
KArchiveDirectory::KArchiveDirectory(KArchive *t, const QString &name, int access,
data/karchive-5.74.0/src/karchive.cpp:852:30:  [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.
    : KArchiveEntry(t, name, access, date, user, group, symlink)
data/karchive-5.74.0/src/karchivedirectory.h:45:67:  [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.
    KArchiveDirectory(KArchive *archive, const QString &name, int access, const QDateTime &date,
data/karchive-5.74.0/src/karchiveentry.h:47:63:  [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.
    KArchiveEntry(KArchive *archive, const QString &name, int access, const QDateTime &date,
data/karchive-5.74.0/src/karchivefile.h:39:62:  [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.
    KArchiveFile(KArchive *archive, const QString &name, int access, const QDateTime &date,
data/karchive-5.74.0/src/krcc.cpp:36:63:  [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.
    KRccFileEntry(KArchive *archive, const QString &name, int access, const QDateTime &date,
data/karchive-5.74.0/src/krcc.cpp:38:39:  [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.
        : KArchiveFile(archive, name, access, date, user, group, QString(), 0, size)
data/karchive-5.74.0/src/ktar.cpp:462:17:  [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.
                access |= S_IFDIR;    // f*cking broken tar files
data/karchive-5.74.0/src/ktar.cpp:468:53:  [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.
                e = new KArchiveDirectory(this, nm, access, KArchivePrivate::time_tToDateTime(time), user, group, symlink);
data/karchive-5.74.0/src/ktar.cpp:478:57:  [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.
                    e = new KArchiveDirectory(this, nm, access, KArchivePrivate::time_tToDateTime(time), user, group, symlink);
data/karchive-5.74.0/src/ktar.cpp:488:52:  [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.
                    e = new KArchiveFile(this, nm, access, KArchivePrivate::time_tToDateTime(time), user, group, symlink,
data/karchive-5.74.0/src/ktar.cpp:705:5:  [4] (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).
    strcpy(buffer + 0x109, uname);
data/karchive-5.74.0/src/ktar.cpp:707:5:  [4] (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).
    strcpy(buffer + 0x129, gname);
data/karchive-5.74.0/src/kzip.cpp:702:21:  [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.
                    access |= S_IFDIR | 0700;
data/karchive-5.74.0/src/kzip.cpp:726:68:  [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.
                    entry = new KArchiveDirectory(this, entryName, access, mtime, rootDir()->user(), rootDir()->group(), QString());
data/karchive-5.74.0/src/kzip.cpp:731:22:  [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 & QT_STAT_MASK) == QT_STAT_LNK) {
data/karchive-5.74.0/src/kzip.cpp:735:60:  [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.
                entry = new KZipFileEntry(this, entryName, access, mtime,
data/karchive-5.74.0/src/kzip.cpp:1365:66:  [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.
KZipFileEntry::KZipFileEntry(KZip *zip, const QString &name, int access, const QDateTime &date,
data/karchive-5.74.0/src/kzip.cpp:1369:31:  [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.
    : KArchiveFile(zip, name, access, date, user, group, symlink, start, uncompressedSize)
data/karchive-5.74.0/src/kzipfileentry.h:24:55:  [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.
    KZipFileEntry(KZip *zip, const QString &name, int access, const QDateTime &date,
data/karchive-5.74.0/autotests/deprecatedtest.cpp:24: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).
        QVERIFY(zip.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/deprecatedtest.cpp:32: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).
        QVERIFY(zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:64:23:  [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).
    QVERIFY(localFile.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:74: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 medium[SIZE1];
data/karchive-5.74.0/autotests/karchivetest.cpp:105:5:  [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 buffer[255];
data/karchive-5.74.0/autotests/karchivetest.cpp:377: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).
    QVERIFY(!tar.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:386: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).
    QVERIFY(!tar.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:393: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).
    QVERIFY(!tar.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:417: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).
        QVERIFY(tar.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:446: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).
        QVERIFY(tar.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:501: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).
        QVERIFY(tar.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:567:23:  [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).
    QVERIFY(filterDev.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:591: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).
    QVERIFY(tar.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:607: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).
    QVERIFY(tar.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:623: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).
    QVERIFY(tar.open(QIODevice::ReadWrite));
data/karchive-5.74.0/autotests/karchivetest.cpp:633: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).
        QVERIFY(tar.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:661: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).
    QVERIFY(tar.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:677: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).
    QVERIFY(tar.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:698: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).
    QVERIFY2(tar.open(QIODevice::ReadOnly), "global_header_test.tar.gz");
data/karchive-5.74.0/autotests/karchivetest.cpp:716: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).
    QVERIFY2(tar.open(QIODevice::ReadOnly), "tar_prefix_test.tar.gz");
data/karchive-5.74.0/autotests/karchivetest.cpp:742: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).
    QVERIFY2(tar.open(QIODevice::ReadOnly), "tar_directory_forgotten.tar.gz");
data/karchive-5.74.0/autotests/karchivetest.cpp:760: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).
    QVERIFY(tar.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:778: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).
    QVERIFY2(tar.open(QIODevice::ReadOnly), qPrintable(tar.fileName()));
data/karchive-5.74.0/autotests/karchivetest.cpp:801: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).
        QVERIFY(tar.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:809: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).
        QVERIFY(tar.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:829: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).
    QVERIFY(tar.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:844: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).
    QVERIFY(tar.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:867: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).
    QVERIFY(tar.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:892: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).
    QVERIFY(zip.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:912: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).
    QVERIFY(zipFile.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:928: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).
    QVERIFY(!zip.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:938:23:  [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).
    QVERIFY(brokenZip.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:947: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).
        QVERIFY(!zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:952: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).
        QVERIFY(brokenZip.open(QIODevice::WriteOnly | QIODevice::Append));
data/karchive-5.74.0/autotests/karchivetest.cpp:959: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).
        QVERIFY(!zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:973: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).
    QVERIFY(zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1018: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).
    QVERIFY(zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1029: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).
    QVERIFY(zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1040: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).
    QVERIFY(zip.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1053: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).
    QVERIFY(zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1072: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).
    QVERIFY(zip.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1081: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).
    QVERIFY(zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1098: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).
    QVERIFY(zip.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1110: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).
    QVERIFY(zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1127: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::WriteOnly)) {
data/karchive-5.74.0/autotests/karchivetest.cpp:1147: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).
        QVERIFY(zip.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1154: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).
        QVERIFY(zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1185: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).
    QVERIFY(zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1212: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).
    QVERIFY(zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1225: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).
    QVERIFY(zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1240: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).
    QVERIFY(zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1253: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).
    QVERIFY(zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1271: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).
    QVERIFY(rcc.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1289:16:  [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).
    QVERIFY(ar.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1356:23:  [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).
        QVERIFY(k7zip.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1382:23:  [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).
        QVERIFY(k7zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1431: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).
    QVERIFY(k7zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1447: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).
    QVERIFY(k7zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1463: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).
    QVERIFY(k7zip.open(QIODevice::ReadWrite));
data/karchive-5.74.0/autotests/karchivetest.cpp:1473:23:  [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).
        QVERIFY(k7zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1495: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).
    QVERIFY(k7zip.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/karchivetest.cpp:1507: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).
    QVERIFY(k7zip.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/kcompressiondevicetest.cpp:85: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).
    QVERIFY(archive->open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/kcompressiondevicetest.cpp:152: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).
    QVERIFY(!dev.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/kcompressiondevicetest.cpp:167: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).
    QVERIFY(dev.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/kcompressiondevicetest.cpp:172: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).
    QVERIFY(file.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/kcompressiondevicetest.cpp:204: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).
    QVERIFY(b.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/kcompressiondevicetest.cpp:207: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).
    QVERIFY(kcd.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/kfiltertest.cpp:48: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).
    bool ok = dev.open(QIODevice::WriteOnly);
data/karchive-5.74.0/autotests/kfiltertest.cpp:113: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).
    bool ok = dev.open(QIODevice::ReadOnly);
data/karchive-5.74.0/autotests/kfiltertest.cpp:162: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).
    bool ok = dev.open(QIODevice::ReadOnly);
data/karchive-5.74.0/autotests/kfiltertest.cpp:193: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).
    bool ok = dev.open(QIODevice::ReadOnly);
data/karchive-5.74.0/autotests/kfiltertest.cpp:224: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).
    bool ok = flt.open(QIODevice::ReadOnly);
data/karchive-5.74.0/autotests/kfiltertest.cpp:236: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).
    QVERIFY(device.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/kfiltertest.cpp:264:12:  [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).
    buffer.open(QIODevice::ReadOnly);
data/karchive-5.74.0/autotests/kfiltertest.cpp:267: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).
    bool ok = flt.open(QIODevice::ReadOnly);
data/karchive-5.74.0/autotests/kfiltertest.cpp:324: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).
    bool ok = flt->open(QIODevice::ReadOnly);
data/karchive-5.74.0/autotests/kfiltertest.cpp:334: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[8192];
data/karchive-5.74.0/autotests/kfiltertest.cpp:355: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).
    QVERIFY(file.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/kfiltertest.cpp:360: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).
    QVERIFY(inBuffer.open(QIODevice::ReadWrite));
data/karchive-5.74.0/autotests/kfiltertest.cpp:363: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).
    QVERIFY(flt.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/kfiltertest.cpp:396: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).
        QVERIFY(file.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/kfiltertest.cpp:398:24:  [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).
        QVERIFY(device.open(QIODevice::WriteOnly));
data/karchive-5.74.0/autotests/kfiltertest.cpp:413: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).
    QVERIFY(reader.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/kfiltertest.cpp:420: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).
    QVERIFY(otherReader.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/kfiltertest.cpp:433: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).
    QVERIFY(dev.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/kfiltertest.cpp:445: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).
    QVERIFY(dev.open(QIODevice::ReadOnly));
data/karchive-5.74.0/autotests/klimitediodevicetest.cpp:31: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).
    m_buffer.open(QIODevice::ReadOnly);
data/karchive-5.74.0/examples/bzip2gzip/main.cpp:51:11:  [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).
    input.open(QIODevice::ReadOnly);
data/karchive-5.74.0/examples/bzip2gzip/main.cpp:57:12:  [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).
    output.open(QIODevice::WriteOnly);
data/karchive-5.74.0/examples/helloworld/main.cpp:30: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 (archive.open(QIODevice::WriteOnly)) {
data/karchive-5.74.0/examples/helloworld/main.cpp:43: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 (archive.open(QIODevice::ReadOnly)) {
data/karchive-5.74.0/examples/tarlocalfiles/main.cpp:33: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 (!archive.open(QIODevice::WriteOnly)) {
data/karchive-5.74.0/examples/unzipper/main.cpp:38: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 (!archive.open(QIODevice::ReadOnly)) {
data/karchive-5.74.0/src/k7zip.cpp:36:23:  [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 const unsigned char k7zip_signature[6] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C};
data/karchive-5.74.0/src/k7zip.cpp:195: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).
    m_buffer->open(QIODevice::ReadOnly);
data/karchive-5.74.0/src/k7zip.cpp:2084: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).
        flt.open(QIODevice::WriteOnly);
data/karchive-5.74.0/src/k7zip.cpp:2279:14:  [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.
    unsigned char buf[24];
data/karchive-5.74.0/src/k7zip.cpp:2289:14:  [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.
    unsigned char buf[8];
data/karchive-5.74.0/src/k7zip.cpp:2290: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(buf, k7zip_signature, 6);
data/karchive-5.74.0/src/k7zip.cpp:2309: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 header[32];
data/karchive-5.74.0/src/k7zip.cpp:2768: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).
        flt.open(QIODevice::WriteOnly);
data/karchive-5.74.0/src/karchive.cpp:136:16:  [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 KArchive::open(QIODevice::OpenMode mode)
data/karchive-5.74.0/src/karchive.cpp:156:39:  [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->dev->isOpen() && !d->dev->open(mode)) {
data/karchive-5.74.0/src/karchive.cpp:183: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).
            if (!d->saveFile->open(QIODevice::WriteOnly)) {
data/karchive-5.74.0/src/karchive.cpp:321: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)) {
data/karchive-5.74.0/src/karchive.cpp:470:5:  [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 buffer[255];
data/karchive-5.74.0/src/karchive.cpp:814:11:  [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 (f.open(QIODevice::ReadWrite | QIODevice::Truncate)) {
data/karchive-5.74.0/src/karchive.h:70: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).
    virtual bool open(QIODevice::OpenMode mode);
data/karchive-5.74.0/src/kcompressiondevice.cpp:132:26:  [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 KCompressionDevice::open(QIODevice::OpenMode mode)
data/karchive-5.74.0/src/kcompressiondevice.cpp:150: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 (!d->filter->device()->open(mode)) {
data/karchive-5.74.0/src/kcompressiondevice.h:70: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(QIODevice::OpenMode mode) override;
data/karchive-5.74.0/src/kgzipfilter.cpp:265: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(d->zStream.next_out, d->zStream.next_in, n);
data/karchive-5.74.0/src/klimitediodevice.cpp:16:5:  [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).
    open(QIODevice::ReadOnly);   //krazy:exclude=syscalls
data/karchive-5.74.0/src/klimitediodevice.cpp:19:24:  [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 KLimitedIODevice::open(QIODevice::OpenMode m)
data/karchive-5.74.0/src/klimitediodevice_p.h:37: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(QIODevice::OpenMode m) override;
data/karchive-5.74.0/src/knonefilter.cpp:118: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(d->next_out, d->next_in, n);
data/karchive-5.74.0/src/krcc.cpp:46: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 (f.open(QIODevice::ReadOnly)) {
data/karchive-5.74.0/src/ktar.cpp:89: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 (f.open(QIODevice::ReadOnly)) {
data/karchive-5.74.0/src/ktar.cpp:145: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).
        d->tmpFile->open();
data/karchive-5.74.0/src/ktar.cpp:325: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 (! filterDev.open(QIODevice::ReadOnly)) {
data/karchive-5.74.0/src/ktar.cpp:380: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 buffer[0x200];
data/karchive-5.74.0/src/ktar.cpp:562: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 (!dev.open(QIODevice::WriteOnly)) {
data/karchive-5.74.0/src/ktar.cpp:612: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 buffer[0x201];
data/karchive-5.74.0/src/ktar.cpp:659: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(buffer + 0x64, mode, 6);
data/karchive-5.74.0/src/ktar.cpp:664:5:  [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(buffer + 0x6c, "   765 ");  // 501 in decimal
data/karchive-5.74.0/src/ktar.cpp:666:5:  [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(buffer + 0x74, "   144 ");  // 100 in decimal
data/karchive-5.74.0/src/ktar.cpp:671: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(buffer + 0x7c, s.data(), 11);
data/karchive-5.74.0/src/ktar.cpp:678: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(buffer + 0x88, s.data(), 11);
data/karchive-5.74.0/src/ktar.cpp:701:5:  [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(buffer + 0x101, "ustar");
data/karchive-5.74.0/src/ktar.cpp:702:5:  [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(buffer + 0x107, "00");
data/karchive-5.74.0/src/ktar.cpp:716: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(buffer + 0x94, s.constData(), 6);
data/karchive-5.74.0/src/ktar.cpp:722:5:  [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(buffer, "././@LongLink");
data/karchive-5.74.0/src/ktar.cpp:729: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(buffer, name.data() + offset, chunksize);
data/karchive-5.74.0/src/ktar.cpp:776: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 buffer[0x201];
data/karchive-5.74.0/src/ktar.cpp:841: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 buffer[0x201];
data/karchive-5.74.0/src/ktar.cpp:896: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 buffer[0x201];
data/karchive-5.74.0/src/kxzfilter.cpp:96:22:  [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.
            unsigned char props[5];
data/karchive-5.74.0/src/kxzfilter.cpp:116:22:  [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.
            unsigned char props[1];
data/karchive-5.74.0/src/kxzfilter.cpp:131:22:  [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.
            unsigned char props[5] = { 0x5d, 0x00, 0x00, 0x08, 0x00 }
data/karchive-5.74.0/src/kzip.cpp:342: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 buffer[3];
data/karchive-5.74.0/src/kzip.cpp:436: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 buffer[47];
data/karchive-5.74.0/src/kzip.cpp:834: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 buffer[22]; // first used for 12, then for 22 at the end
data/karchive-5.74.0/src/kzip.cpp:1214:26:  [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).
    b = d->m_currentDev->open(QIODevice::WriteOnly);
data/karchive-5.74.0/src/kzip.cpp:1450:29:  [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 b = filterDev->open(QIODevice::ReadOnly);
data/karchive-5.74.0/tests/k7ziptest.cpp:54: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 (!k7z.open(QIODevice::ReadOnly)) {
data/karchive-5.74.0/tests/kartest.cpp:43: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 (!archive.open(QIODevice::ReadOnly)) {
data/karchive-5.74.0/tests/krcctest.cpp:43: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 (!rcc.open(QIODevice::ReadOnly)) {
data/karchive-5.74.0/tests/ktartest.cpp:43: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 (!tar.open(QIODevice::ReadOnly)) {
data/karchive-5.74.0/tests/kziptest.cpp:67: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 (!zip.open(QIODevice::ReadOnly)) {
data/karchive-5.74.0/tests/kziptest.cpp:81: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 (!zip.open(QIODevice::ReadOnly)) {
data/karchive-5.74.0/tests/kziptest.cpp:107: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 (!zip.open(QIODevice::WriteOnly)) {
data/karchive-5.74.0/tests/kziptest.cpp:135: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 (!zip.open(QIODevice::ReadOnly)) {
data/karchive-5.74.0/tests/kziptest.cpp:150: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 (!zip.open(QIODevice::ReadOnly)) {
data/karchive-5.74.0/tests/kziptest.cpp:169: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 (!zip.open(QIODevice::ReadWrite)) {
data/karchive-5.74.0/tests/kziptest.cpp:175:12:  [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 (!f.open(QIODevice::ReadOnly)) {
data/karchive-5.74.0/tests/kziptest.cpp:188: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 (!zip1.open(QIODevice::ReadOnly)) {
data/karchive-5.74.0/tests/kziptest.cpp:192: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 (!zip2.open(QIODevice::WriteOnly)) {
data/karchive-5.74.0/tests/kziptest.cpp:220: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 (!device.open(QIODevice::WriteOnly)) {
data/karchive-5.74.0/tests/kziptest.cpp:238: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 (!device.open(QIODevice::ReadOnly)) {
data/karchive-5.74.0/autotests/karchivetest.cpp:191:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    contents = dev->read(5); // test reading in two chunks
data/karchive-5.74.0/autotests/karchivetest.cpp:193:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    contents += dev->read(50);
data/karchive-5.74.0/autotests/karchivetest.cpp:209:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    contents = dev->read(2);
data/karchive-5.74.0/autotests/karchivetest.cpp:214:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    contents = dev->read(1);
data/karchive-5.74.0/autotests/karchivetest.cpp:217:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    contents = dev->read(1);
data/karchive-5.74.0/autotests/karchivetest.cpp:239:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QByteArray secondLine = dev->read(100);
data/karchive-5.74.0/autotests/karchivetest.cpp:572:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        len = filterDev.read(buffer.data(), buffer.size());
data/karchive-5.74.0/autotests/karchivetest.cpp:913:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QByteArray arr = zipFile.read(4);
data/karchive-5.74.0/autotests/karchivetest.cpp:916:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    arr = zipFile.read(8);
data/karchive-5.74.0/autotests/karchivetest.cpp:918:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    arr = zipFile.read(zipMimeType.size());
data/karchive-5.74.0/autotests/karchivetest.cpp:994:85:  [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).
    QCOMPARE(listing[8], QString("mode=100644 path=mimetype type=file size=%1").arg(strlen(s_zipMimeType)));
data/karchive-5.74.0/autotests/kcompressiondevicetest.cpp:211:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    const QByteArray kcdData = kcd.read(10);
data/karchive-5.74.0/autotests/kfiltertest.cpp:117:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QByteArray read;
data/karchive-5.74.0/autotests/kfiltertest.cpp:119:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((n = dev.read(array.data(), array.size()))) {
data/karchive-5.74.0/autotests/kfiltertest.cpp:128:39:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        QCOMPARE((int)dev.pos(), (int)read.size());
data/karchive-5.74.0/autotests/kfiltertest.cpp:131:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QCOMPARE(read, testData);
data/karchive-5.74.0/autotests/kfiltertest.cpp:137:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QCOMPARE(read.size(), testData.size());
data/karchive-5.74.0/autotests/kfiltertest.cpp:138:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QCOMPARE(read, testData);
data/karchive-5.74.0/autotests/kfiltertest.cpp:164:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QByteArray read;
data/karchive-5.74.0/autotests/kfiltertest.cpp:171:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QCOMPARE(read, testData);
data/karchive-5.74.0/autotests/kfiltertest.cpp:200:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QCOMPARE(read, testData);
data/karchive-5.74.0/autotests/kfiltertest.cpp:227:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QCOMPARE(read.size(), expectedData.size());
data/karchive-5.74.0/autotests/kfiltertest.cpp:228:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QCOMPARE(read, expectedData);
data/karchive-5.74.0/autotests/kfiltertest.cpp:270:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QCOMPARE(read.size(), testData.size());
data/karchive-5.74.0/autotests/kfiltertest.cpp:271:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QCOMPARE(read, testData);
data/karchive-5.74.0/autotests/kfiltertest.cpp:340:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QByteArray read(buf, bytesOut);
data/karchive-5.74.0/autotests/kfiltertest.cpp:344:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QCOMPARE(QString::fromLatin1(read.constData()), QString::fromLatin1(data.constData())); // more readable output than the line below
data/karchive-5.74.0/autotests/kfiltertest.cpp:345:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QCOMPARE(read, data);
data/karchive-5.74.0/autotests/kfiltertest.cpp:365:37:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    qDebug() << QString::fromLatin1(read.constData());
data/karchive-5.74.0/autotests/kfiltertest.cpp:371:37:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    qDebug() << QString::fromLatin1(read.constData());
data/karchive-5.74.0/examples/bzip2gzip/main.cpp:61:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        QByteArray data = input.read(512);
data/karchive-5.74.0/src/k7zip.cpp:1542:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            quint64 n = dev->read(encodedBuffer.get(), size);
data/karchive-5.74.0/src/k7zip.cpp:2311:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    qint64 n = dev->read(header, 32);
data/karchive-5.74.0/src/k7zip.cpp:2365:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    n = dev->read(inBuffer.data(), inBuffer.size());
data/karchive-5.74.0/src/kar.cpp:102:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    QByteArray magic = dev->read(7);
data/karchive-5.74.0/src/kar.cpp:115:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (dev->read(ar_header.data(), 60) != 60) {   // Read ar header
data/karchive-5.74.0/src/kar.cpp:141:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                dev->read(ar_longnames.data(), size);
data/karchive-5.74.0/src/karchive.cpp:339:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((n = file.read(array.data(), array.size())) > 0) {
data/karchive-5.74.0/src/karchive.cpp:779:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        arr = archive()->device()->read(d->size);
data/karchive-5.74.0/src/karchive.cpp:829:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            const qint64 n = inputDev->read(array.data(), currentChunkSize);
data/karchive-5.74.0/src/kcompressiondevice.cpp:240:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        const bool result = (read(dummy.data(), bytesToReadThisTime) == bytesToReadThisTime);
data/karchive-5.74.0/src/kcompressiondevice.cpp:283:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            int size = filter->device()->read(d->buffer.data(),
data/karchive-5.74.0/src/klimitediodevice.cpp:49:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return m_dev->read(data, maxlen);
data/karchive-5.74.0/src/ktar.cpp:177:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    qint64 n = q->device()->read(buffer, 0x200);
data/karchive-5.74.0/src/ktar.cpp:241:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        n = dev->read(longlink.data() + offset, chunksize);
data/karchive-5.74.0/src/ktar.cpp:251:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (dev->read(buffer, skip) != skip) {
data/karchive-5.74.0/src/ktar.cpp:333:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        len = filterDev.read(buffer.data(), buffer.size());
data/karchive-5.74.0/src/ktar.cpp:457:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                (void)dev->read(buffer, 0x200);
data/karchive-5.74.0/src/ktar.cpp:575:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        len = file->read(buffer.data(), buffer.size());
data/karchive-5.74.0/src/ktar.cpp:658:12:  [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).
    assert(strlen(mode) == 6);
data/karchive-5.74.0/src/ktar.cpp:793:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buffer, encodedFileName.constData(), 99);
data/karchive-5.74.0/src/ktar.cpp:858:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buffer, encodedDirname.constData(), 99);
data/karchive-5.74.0/src/ktar.cpp:917:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buffer, encodedFileName.constData(), 99);
data/karchive-5.74.0/src/ktar.cpp:920:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buffer + 0x9d, encodedTarget.constData(), 99);
data/karchive-5.74.0/src/kzip.cpp:345:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int n = dev->read(buffer, 1);
data/karchive-5.74.0/src/kzip.cpp:355:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        n = dev->read(buffer, 3);
data/karchive-5.74.0/src/kzip.cpp:453:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int n = dev->read(buffer, 4);
data/karchive-5.74.0/src/kzip.cpp:473:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            n = dev->read(buffer, 24);
data/karchive-5.74.0/src/kzip.cpp:504:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            QByteArray fileName = dev->read(namelen);
data/karchive-5.74.0/src/kzip.cpp:522:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            n = dev->read(buffer, handledextralen);
data/karchive-5.74.0/src/kzip.cpp:552:48:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    pfi.guessed_symlink = dev->read(uncomp_size);
data/karchive-5.74.0/src/kzip.cpp:585:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    n = dev->read(buffer, 4);
data/karchive-5.74.0/src/kzip.cpp:618:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            n = dev->read(buffer + 4, 42);
data/karchive-5.74.0/src/kzip.cpp:634:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            QByteArray bufferName = dev->read(namelen);
data/karchive-5.74.0/src/kzip.cpp:778:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                n = dev->read(buffer, 1);
data/karchive-5.74.0/src/kzip.cpp:788:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                n = dev->read(buffer, 3);
data/karchive-5.74.0/src/kzip.cpp:945:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buffer + 46, path.constData(), path.length());
data/karchive-5.74.0/src/kzip.cpp:1165:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buffer + 30, encodedName.constData(), encodedName.length());

ANALYSIS SUMMARY:

Hits = 265
Lines analyzed = 13820 in approximately 0.39 seconds (35397 lines/second)
Physical Source Lines of Code (SLOC) = 9522
Hits@level = [0]  31 [1]  68 [2] 160 [3]   0 [4]  35 [5]   2
Hits@level+ = [0+] 296 [1+] 265 [2+] 197 [3+]  37 [4+]  37 [5+]   2
Hits/KSLOC@level+ = [0+] 31.0859 [1+] 27.8303 [2+] 20.6889 [3+] 3.88574 [4+] 3.88574 [5+] 0.21004
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.