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/ark-20.08.1/part/arkviewer.h
Examining data/ark-20.08.1/part/archiveview.h
Examining data/ark-20.08.1/part/archivesortfiltermodel.h
Examining data/ark-20.08.1/part/part.cpp
Examining data/ark-20.08.1/part/jobtracker.cpp
Examining data/ark-20.08.1/part/archiveview.cpp
Examining data/ark-20.08.1/part/interface.h
Examining data/ark-20.08.1/part/factory.h
Examining data/ark-20.08.1/part/infopanel.h
Examining data/ark-20.08.1/part/overwritedialog.cpp
Examining data/ark-20.08.1/part/part.h
Examining data/ark-20.08.1/part/infopanel.cpp
Examining data/ark-20.08.1/part/archivesortfiltermodel.cpp
Examining data/ark-20.08.1/part/jobtracker.h
Examining data/ark-20.08.1/part/arkviewer.cpp
Examining data/ark-20.08.1/part/factory.cpp
Examining data/ark-20.08.1/part/archivemodel.cpp
Examining data/ark-20.08.1/part/overwritedialog.h
Examining data/ark-20.08.1/part/archivemodel.h
Examining data/ark-20.08.1/autotests/testhelper/testhelper.cpp
Examining data/ark-20.08.1/autotests/testhelper/abstractaddtest.h
Examining data/ark-20.08.1/autotests/testhelper/abstractaddtest.cpp
Examining data/ark-20.08.1/autotests/testhelper/testhelper.h
Examining data/ark-20.08.1/autotests/app/batchextracttest.cpp
Examining data/ark-20.08.1/autotests/kerfuffle/metadatatest.cpp
Examining data/ark-20.08.1/autotests/kerfuffle/extracttest.cpp
Examining data/ark-20.08.1/autotests/kerfuffle/createdialogtest.cpp
Examining data/ark-20.08.1/autotests/kerfuffle/loadtest.cpp
Examining data/ark-20.08.1/autotests/kerfuffle/deletetest.cpp
Examining data/ark-20.08.1/autotests/kerfuffle/addtest.cpp
Examining data/ark-20.08.1/autotests/kerfuffle/mimetypetest.cpp
Examining data/ark-20.08.1/autotests/kerfuffle/jsonarchiveinterface.cpp
Examining data/ark-20.08.1/autotests/kerfuffle/jsonarchiveinterface.h
Examining data/ark-20.08.1/autotests/kerfuffle/jsonparser.cpp
Examining data/ark-20.08.1/autotests/kerfuffle/jobstest.cpp
Examining data/ark-20.08.1/autotests/kerfuffle/movetest.cpp
Examining data/ark-20.08.1/autotests/kerfuffle/adddialogtest.cpp
Examining data/ark-20.08.1/autotests/kerfuffle/jsonparser.h
Examining data/ark-20.08.1/autotests/kerfuffle/copytest.cpp
Examining data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c
Examining data/ark-20.08.1/autotests/kerfuffle/addtoarchivetest.cpp
Examining data/ark-20.08.1/autotests/plugins/cli7zplugin/cli7ztest.h
Examining data/ark-20.08.1/autotests/plugins/cli7zplugin/cli7ztest.cpp
Examining data/ark-20.08.1/autotests/plugins/clizipplugin/cliziptest.h
Examining data/ark-20.08.1/autotests/plugins/clizipplugin/cliziptest.cpp
Examining data/ark-20.08.1/autotests/plugins/cliunarchiverplugin/cliunarchivertest.cpp
Examining data/ark-20.08.1/autotests/plugins/cliunarchiverplugin/cliunarchivertest.h
Examining data/ark-20.08.1/autotests/plugins/clirarplugin/clirartest.cpp
Examining data/ark-20.08.1/autotests/plugins/clirarplugin/clirartest.h
Examining data/ark-20.08.1/app/mainwindow.h
Examining data/ark-20.08.1/app/compressfileitemaction.cpp
Examining data/ark-20.08.1/app/batchextract.h
Examining data/ark-20.08.1/app/mainwindow.cpp
Examining data/ark-20.08.1/app/extractfileitemaction.cpp
Examining data/ark-20.08.1/app/extractfileitemaction.h
Examining data/ark-20.08.1/app/extractHereDndPlugin.cpp
Examining data/ark-20.08.1/app/main.cpp
Examining data/ark-20.08.1/app/extractHereDndPlugin.h
Examining data/ark-20.08.1/app/compressfileitemaction.h
Examining data/ark-20.08.1/app/batchextract.cpp
Examining data/ark-20.08.1/kerfuffle/cliproperties.cpp
Examining data/ark-20.08.1/kerfuffle/adddialog.h
Examining data/ark-20.08.1/kerfuffle/jobs.h
Examining data/ark-20.08.1/kerfuffle/pluginmanager.cpp
Examining data/ark-20.08.1/kerfuffle/queries.cpp
Examining data/ark-20.08.1/kerfuffle/previewsettingspage.h
Examining data/ark-20.08.1/kerfuffle/archiveformat.h
Examining data/ark-20.08.1/kerfuffle/queries.h
Examining data/ark-20.08.1/kerfuffle/extractionsettingspage.cpp
Examining data/ark-20.08.1/kerfuffle/addtoarchive.h
Examining data/ark-20.08.1/kerfuffle/plugin.cpp
Examining data/ark-20.08.1/kerfuffle/extractionsettingspage.h
Examining data/ark-20.08.1/kerfuffle/jobs.cpp
Examining data/ark-20.08.1/kerfuffle/options.cpp
Examining data/ark-20.08.1/kerfuffle/settingsdialog.cpp
Examining data/ark-20.08.1/kerfuffle/adddialog.cpp
Examining data/ark-20.08.1/kerfuffle/cliinterface.h
Examining data/ark-20.08.1/kerfuffle/settingspage.h
Examining data/ark-20.08.1/kerfuffle/mimetypes.h
Examining data/ark-20.08.1/kerfuffle/createdialog.cpp
Examining data/ark-20.08.1/kerfuffle/propertiesdialog.cpp
Examining data/ark-20.08.1/kerfuffle/settingspage.cpp
Examining data/ark-20.08.1/kerfuffle/previewsettingspage.cpp
Examining data/ark-20.08.1/kerfuffle/pluginsettingspage.h
Examining data/ark-20.08.1/kerfuffle/generalsettingspage.cpp
Examining data/ark-20.08.1/kerfuffle/settingsdialog.h
Examining data/ark-20.08.1/kerfuffle/archiveformat.cpp
Examining data/ark-20.08.1/kerfuffle/extractiondialog.cpp
Examining data/ark-20.08.1/kerfuffle/createdialog.h
Examining data/ark-20.08.1/kerfuffle/archiveinterface.cpp
Examining data/ark-20.08.1/kerfuffle/extractiondialog.h
Examining data/ark-20.08.1/kerfuffle/pluginsettingspage.cpp
Examining data/ark-20.08.1/kerfuffle/archiveentry.cpp
Examining data/ark-20.08.1/kerfuffle/pluginmanager.h
Examining data/ark-20.08.1/kerfuffle/archive_kerfuffle.h
Examining data/ark-20.08.1/kerfuffle/compressionoptionswidget.cpp
Examining data/ark-20.08.1/kerfuffle/cliinterface.cpp
Examining data/ark-20.08.1/kerfuffle/archive_kerfuffle.cpp
Examining data/ark-20.08.1/kerfuffle/addtoarchive.cpp
Examining data/ark-20.08.1/kerfuffle/mimetypes.cpp
Examining data/ark-20.08.1/kerfuffle/compressionoptionswidget.h
Examining data/ark-20.08.1/kerfuffle/generalsettingspage.h
Examining data/ark-20.08.1/kerfuffle/options.h
Examining data/ark-20.08.1/kerfuffle/plugin.h
Examining data/ark-20.08.1/kerfuffle/propertiesdialog.h
Examining data/ark-20.08.1/kerfuffle/archiveentry.h
Examining data/ark-20.08.1/kerfuffle/cliproperties.h
Examining data/ark-20.08.1/kerfuffle/archiveinterface.h
Examining data/ark-20.08.1/plugins/cli7zplugin/cliplugin.cpp
Examining data/ark-20.08.1/plugins/cli7zplugin/cliplugin.h
Examining data/ark-20.08.1/plugins/cliplugin-example/cliplugin.cpp
Examining data/ark-20.08.1/plugins/cliplugin-example/cliplugin.h
Examining data/ark-20.08.1/plugins/libarchive/libarchiveplugin.cpp
Examining data/ark-20.08.1/plugins/libarchive/readonlylibarchiveplugin.h
Examining data/ark-20.08.1/plugins/libarchive/readonlylibarchiveplugin.cpp
Examining data/ark-20.08.1/plugins/libarchive/libarchiveplugin.h
Examining data/ark-20.08.1/plugins/libarchive/readwritelibarchiveplugin.h
Examining data/ark-20.08.1/plugins/libarchive/readwritelibarchiveplugin.cpp
Examining data/ark-20.08.1/plugins/clizipplugin/cliplugin.cpp
Examining data/ark-20.08.1/plugins/clizipplugin/cliplugin.h
Examining data/ark-20.08.1/plugins/libzipplugin/libzipplugin.cpp
Examining data/ark-20.08.1/plugins/libzipplugin/libzipplugin.h
Examining data/ark-20.08.1/plugins/cliunarchiverplugin/cliplugin.cpp
Examining data/ark-20.08.1/plugins/cliunarchiverplugin/cliplugin.h
Examining data/ark-20.08.1/plugins/clirarplugin/cliplugin.cpp
Examining data/ark-20.08.1/plugins/clirarplugin/cliplugin.h
Examining data/ark-20.08.1/plugins/libsinglefileplugin/bz2plugin.h
Examining data/ark-20.08.1/plugins/libsinglefileplugin/singlefileplugin.cpp
Examining data/ark-20.08.1/plugins/libsinglefileplugin/singlefileplugin.h
Examining data/ark-20.08.1/plugins/libsinglefileplugin/gzplugin.h
Examining data/ark-20.08.1/plugins/libsinglefileplugin/gzplugin.cpp
Examining data/ark-20.08.1/plugins/libsinglefileplugin/bz2plugin.cpp
Examining data/ark-20.08.1/plugins/libsinglefileplugin/xzplugin.h
Examining data/ark-20.08.1/plugins/libsinglefileplugin/xzplugin.cpp

FINAL RESULTS:

data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:290:11:  [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.
	length = readlink("/proc/self/exe", fullpath, sizeof(fullpath));
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:127:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf (uri, "file://%s", dir);
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:145:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(thumb, "%s.png", hexdigest);
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:213:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(thumbnails_medium_dir, "%s/thumbnails/normal/", xdg_cache_home);
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:275: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 (filename, mount_dir);
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:299:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(path_to_thumbnail, "%s%s", thumbnails_medium_dir, thumbname);
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:305:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf (diricon, "%s/.DirIcon", mount_dir);
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:317:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(mkcmd, "mkdir -p '%s'", thumbnails_medium_dir);
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:318:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        system(mkcmd);
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:369:5:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    execv (filename, real_argv);
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:210:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  xdg_cache_home = (getenv("XDG_CACHE_HOME") == NULL
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:211:24:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It can have any content
  and length, and the same variable can be set more than once (CWE-807,
  CWE-20). Check environment variables carefully before using them.
    ? g_build_filename(g_get_home_dir(), ".cache", NULL)
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:212:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    : g_strdup(getenv("XDG_CACHE_HOME")));
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:240:17:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    char *dir = realpath( "/proc/self/exe", NULL );
data/ark-20.08.1/app/mainwindow.cpp:177:37:  [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_openAction = KStandardAction::open(this, &MainWindow::openArchive, this);
data/ark-20.08.1/app/mainwindow.cpp:222: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).
    dlg->open();
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:71: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 acceptable[96] = {
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:81: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.
static const char hex[17] = "0123456789abcdef";
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:126:2:  [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 uri[URI_MAX];
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:128:2:  [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 newstring[URI_MAX];
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:139: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 hexdigest[33];
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:140:18:  [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 digest[16];
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:160:3:  [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 c[32];
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:202:3:  [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 filename[100]; /* enough for mount_dir + "/AppRun" */
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:209:3:  [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 thumbnails_medium_dir[FILE_MAX];
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:234: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 *child_argv[5];
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:260: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).
    dir_fd = open (mount_dir, O_RDONLY);
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:276:5:  [2] (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). Risk is low because the
  source is a constant string.
    strcat (filename, "/AppRun");
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:289:2:  [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 fullpath[FILE_MAX];
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:293:2:  [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 theuri[URI_MAX];
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:296:2:  [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 path_to_thumbnail[URI_MAX];
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:297:2:  [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 thumbname[URI_MAX];
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:304:2:  [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 diricon[FILE_MAX];
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:308:13:  [2] (misc) fopen:
  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((from = fopen(diricon, "rb"))==NULL) {
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:314: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 mkcmd[FILE_MAX];
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:315: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 iconsdir[FILE_MAX];
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:319:11:  [2] (misc) fopen:
  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((to = fopen(path_to_thumbnail, "wb"))==NULL) {
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:364: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 cwd[1024];
data/ark-20.08.1/autotests/kerfuffle/jobstest.cpp:97: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 (!iface->open()) {
data/ark-20.08.1/autotests/kerfuffle/jsonarchiveinterface.cpp:50:28:  [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 JSONArchiveInterface::open()
data/ark-20.08.1/autotests/kerfuffle/jsonarchiveinterface.cpp:58: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/ark-20.08.1/autotests/kerfuffle/jsonarchiveinterface.h:55: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() override;
data/ark-20.08.1/autotests/plugins/cli7zplugin/cli7ztest.cpp:188: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(outputText.open(QIODevice::ReadOnly));
data/ark-20.08.1/autotests/plugins/clirarplugin/clirartest.cpp:229: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(outputText.open(QIODevice::ReadOnly));
data/ark-20.08.1/autotests/plugins/cliunarchiverplugin/cliunarchivertest.cpp:153: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(jsonFile.open(QIODevice::ReadOnly));
data/ark-20.08.1/kerfuffle/adddialog.cpp:121: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).
    optionsDialog->open();
data/ark-20.08.1/kerfuffle/archive_kerfuffle.cpp:480: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).
OpenJob *Archive::open(Archive::Entry *entry)
data/ark-20.08.1/kerfuffle/archive_kerfuffle.h:203: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).
    OpenJob* open(Archive::Entry *entry);
data/ark-20.08.1/kerfuffle/archiveinterface.cpp:81:32:  [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 ReadOnlyArchiveInterface::open()
data/ark-20.08.1/kerfuffle/archiveinterface.h:78: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();
data/ark-20.08.1/kerfuffle/cliinterface.cpp:1059: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).
    if (!m_commentTempFile->open()) {
data/ark-20.08.1/kerfuffle/propertiesdialog.cpp:120: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/ark-20.08.1/part/archivemodel.cpp:653: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).
OpenJob *ArchiveModel::open(Archive::Entry *file) const
data/ark-20.08.1/part/archivemodel.cpp:656: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).
    OpenJob *job = m_archive->open(file);
data/ark-20.08.1/part/archivemodel.h:98: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).
    Kerfuffle::OpenJob* open(Archive::Entry *file) const;
data/ark-20.08.1/part/part.cpp:1001:59:  [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).
            job = (m_openFileMode == OpenFile) ? m_model->open(entry) : m_model->openWith(entry);
data/ark-20.08.1/plugins/libarchive/libarchiveplugin.cpp:519: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 buff[10240];
data/ark-20.08.1/plugins/libarchive/libarchiveplugin.cpp:522: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/ark-20.08.1/plugins/libarchive/libarchiveplugin.cpp:548: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 buff[10240];
data/ark-20.08.1/plugins/libarchive/readwritelibarchiveplugin.cpp:228: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 (!m_tempFile.open(QIODevice::WriteOnly | QIODevice::Unbuffered)) {
data/ark-20.08.1/plugins/libsinglefileplugin/singlefileplugin.cpp:65: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 (!outputFile.open(QIODevice::WriteOnly)) {
data/ark-20.08.1/plugins/libsinglefileplugin/singlefileplugin.cpp:80: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).
    device->open(QIODevice::ReadOnly);
data/ark-20.08.1/plugins/libzipplugin/libzipplugin.cpp:706: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 (!file.open(QIODevice::WriteOnly)) {
data/ark-20.08.1/plugins/libzipplugin/libzipplugin.cpp:716: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 buf[1000];
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:129:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(newstring, uri, URI_MAX); 
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:141:26:  [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).
        md5_buffer( uri, strlen(uri), digest);
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:257:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read (keepalive_pipe[0], &c, 1);
data/ark-20.08.1/autotests/kerfuffle/data/hello-appimage-runtime.c:326:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ch = fgetc(from);
data/ark-20.08.1/part/archivemodel.cpp:390:17:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
            if (equal) {
data/ark-20.08.1/plugins/libarchive/libarchiveplugin.cpp:526:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    auto readBytes = file.read(buff, sizeof(buff));
data/ark-20.08.1/plugins/libarchive/libarchiveplugin.cpp:540:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        readBytes = file.read(buff, sizeof(buff));
data/ark-20.08.1/plugins/libsinglefileplugin/singlefileplugin.cpp:86:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        bytesRead = device->read(dataChunk.data(), dataChunk.size());

ANALYSIS SUMMARY:

Hits = 72
Lines analyzed = 26664 in approximately 0.78 seconds (34126 lines/second)
Physical Source Lines of Code (SLOC) = 17588
Hits@level = [0]   9 [1]   8 [2]  50 [3]   4 [4]   9 [5]   1
Hits@level+ = [0+]  81 [1+]  72 [2+]  64 [3+]  14 [4+]  10 [5+]   1
Hits/KSLOC@level+ = [0+] 4.60541 [1+] 4.0937 [2+] 3.63884 [3+] 0.795997 [4+] 0.568569 [5+] 0.0568569
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.