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/4pane-6.0/MyFiles.cpp
Examining data/4pane-6.0/Devices.h
Examining data/4pane-6.0/Accelerators.h
Examining data/4pane-6.0/MyGenericDirCtrl.h
Examining data/4pane-6.0/ExecuteInDialog.cpp
Examining data/4pane-6.0/Accelerators.cpp
Examining data/4pane-6.0/Mounts.cpp
Examining data/4pane-6.0/Bookmarks.h
Examining data/4pane-6.0/Filetypes.h
Examining data/4pane-6.0/Archive.h
Examining data/4pane-6.0/MyDragImage.cpp
Examining data/4pane-6.0/MyFiles.h
Examining data/4pane-6.0/Tools.h
Examining data/4pane-6.0/MyFrame.h
Examining data/4pane-6.0/Misc.cpp
Examining data/4pane-6.0/Archive.cpp
Examining data/4pane-6.0/MyTreeCtrl.cpp
Examining data/4pane-6.0/MyDragImage.h
Examining data/4pane-6.0/Dup.h
Examining data/4pane-6.0/bzipstream.cpp
Examining data/4pane-6.0/MyNotebook.h
Examining data/4pane-6.0/Filetypes.cpp
Examining data/4pane-6.0/Externs.h
Examining data/4pane-6.0/ArchiveStream.cpp
Examining data/4pane-6.0/ArchiveStream.h
Examining data/4pane-6.0/MyDirs.h
Examining data/4pane-6.0/Redo.h
Examining data/4pane-6.0/MyGenericDirCtrl.cpp
Examining data/4pane-6.0/MyNotebook.cpp
Examining data/4pane-6.0/Mounts.h
Examining data/4pane-6.0/Misc.h
Examining data/4pane-6.0/Otherstreams.h
Examining data/4pane-6.0/ExecuteInDialog.h
Examining data/4pane-6.0/Configure.cpp
Examining data/4pane-6.0/Bookmarks.cpp
Examining data/4pane-6.0/Redo.cpp
Examining data/4pane-6.0/sdk/rsvg/rsvg.cpp
Examining data/4pane-6.0/sdk/fswatcher/MyFSWatcher.h
Examining data/4pane-6.0/sdk/fswatcher/MyFSWatcher.cpp
Examining data/4pane-6.0/sdk/bzip/bzlib_private.h
Examining data/4pane-6.0/sdk/bzip/bzlib.h
Examining data/4pane-6.0/sdk/bzip/crctable.c
Examining data/4pane-6.0/sdk/bzip/huffman.c
Examining data/4pane-6.0/sdk/bzip/bzlib.c
Examining data/4pane-6.0/sdk/bzip/randtable.c
Examining data/4pane-6.0/sdk/bzip/blocksort.c
Examining data/4pane-6.0/sdk/bzip/decompress.c
Examining data/4pane-6.0/sdk/bzip/compress.c
Examining data/4pane-6.0/config.h
Examining data/4pane-6.0/MyDirs.cpp
Examining data/4pane-6.0/bzipstream.h
Examining data/4pane-6.0/Devices.cpp
Examining data/4pane-6.0/MyFrame.cpp
Examining data/4pane-6.0/MyTreeCtrl.h
Examining data/4pane-6.0/Otherstreams.cpp
Examining data/4pane-6.0/Tools.cpp
Examining data/4pane-6.0/Dup.cpp
Examining data/4pane-6.0/Configure.h

FINAL RESULTS:

data/4pane-6.0/Filetypes.cpp:100: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(Filepath.mb_str(wxConvUTF8), buf, 500);    // Readlink inserts into buf the destination filepath of the symlink
data/4pane-6.0/Filetypes.cpp:290:9:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
return (chmod(Filepath.mb_str(wxConvUTF8), newmode) == 0);    // All's well, so do the chmod. Success is flagged by zero return
data/4pane-6.0/Filetypes.cpp:159:14:  [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 result = access(Filepath.mb_str(wxConvUTF8), R_OK);       // Use 'access' to see if we have read permission
data/4pane-6.0/Filetypes.cpp:173:14:  [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 result = access(Filepath.mb_str(wxConvUTF8), W_OK);       // Use 'access' to see if we have write permission
data/4pane-6.0/Filetypes.cpp:181:14:  [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 result = access(Filepath.mb_str(wxConvUTF8), X_OK);       // Use 'access' to see if we have execute permission
data/4pane-6.0/Filetypes.cpp:191:14:  [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 result = access(Filepath.mb_str(wxConvUTF8), W_OK | X_OK); // Use 'access' to see if we have permissions
data/4pane-6.0/Misc.cpp:690:17:  [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(m_argv[i], (const char*)args[i].mb_str());
data/4pane-6.0/Misc.cpp:812:20:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if (int ret =  execvp(*argv, argv) == -1) 
data/4pane-6.0/MyFrame.cpp:73:8:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if(system (command) == 0)
data/4pane-6.0/MyGenericDirCtrl.cpp:1112:84:  [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 imageindex = 0 + (GDC_ghostclosedfolder*IsArchv) + ((!IsArchv && access(path.mb_str(wxConvUTF8), R_OK))*GDC_lockedfolder);  // // access() checks if the dir is locked
data/4pane-6.0/MyGenericDirCtrl.cpp:1289:79:  [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 imageindex = 0 + (GDC_ghostclosedfolder * IsArchv) + (!IsArchv && access(path.mb_str(wxConvUTF8), R_OK) * GDC_lockedfolder);
data/4pane-6.0/sdk/bzip/bzlib.c:1417:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
   strcat(mode2, writing ? "w" : "r" );
data/4pane-6.0/sdk/bzip/bzlib_private.h:65:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf ( stderr,   \
data/4pane-6.0/sdk/bzip/bzlib_private.h:74:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
   fprintf(stderr,zf)
data/4pane-6.0/sdk/bzip/bzlib_private.h:76:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
   fprintf(stderr,zf,za1)
data/4pane-6.0/sdk/bzip/bzlib_private.h:78:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
   fprintf(stderr,zf,za1,za2)
data/4pane-6.0/sdk/bzip/bzlib_private.h:80:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
   fprintf(stderr,zf,za1,za2,za3)
data/4pane-6.0/sdk/bzip/bzlib_private.h:82:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
   fprintf(stderr,zf,za1,za2,za3,za4)
data/4pane-6.0/sdk/bzip/bzlib_private.h:84:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
   fprintf(stderr,zf,za1,za2,za3,za4,za5)
data/4pane-6.0/Filetypes.cpp:427:5:  [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.
if (realpath(filepath.mb_str(wxConvUTF8), buf) == NULL) return filepath;  // This function absolutes a relative path, and undoes any symlinks within the path eg /foo/subdir where foo is a symlink for /bar
data/4pane-6.0/Devices.cpp:2158: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[500]; 
data/4pane-6.0/Devices.cpp:2287: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[500]; 
data/4pane-6.0/Filetypes.cpp:99: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[500];                                                // We have to specify a char buffer.  500 bytes should be long enough: it gets truncated anyway
data/4pane-6.0/Filetypes.cpp:373:37:  [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 size_t bufsize = 4096; char buf[bufsize];
data/4pane-6.0/Filetypes.cpp:384:37:  [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 size_t bufsize = 4096; char buf[bufsize];
data/4pane-6.0/Filetypes.cpp:426:1:  [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[PATH_MAX];
data/4pane-6.0/Filetypes.cpp:1904:9:  [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 (open.IsEmpty())  return;
data/4pane-6.0/Filetypes.cpp:1906: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).
    Openfunction(open, usingsu);                          // Then use sub-method for the Open
data/4pane-6.0/Filetypes.cpp:2018: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).
      Openfunction(open, usingsu);                            // Do the rest in submethod, shared by 'Open with'
data/4pane-6.0/Filetypes.cpp:2088:46:  [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).
void FiletypeManager::Openfunction(wxString& open, bool usingsu)  // Submethod to actually launch applic+file.  Used by Open and Open-With
data/4pane-6.0/Filetypes.cpp:2090: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).
if (open.Contains(wxT("$OPEN_IN_TERMINAL ")))           // First check to see if we're to run in terminal.  If so, replace marker with eg. 'xterm -e'
data/4pane-6.0/Filetypes.cpp:2091:3:  [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.Replace(wxT("$OPEN_IN_TERMINAL "), TERMINAL_COMMAND, false);
data/4pane-6.0/Filetypes.cpp:2101: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).
    wxStringTokenizer tkz(open);                        // We now need to replace the /withinarchive/path/to/foo bit of open with ~/temppath/to/foo
data/4pane-6.0/Filetypes.cpp:2107: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).
          { open.Replace(tok, tempfilepath, false); flag = true; break; }
data/4pane-6.0/Filetypes.cpp:2113: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).
if (!usingsu)  wxExecute(open);                         // If we can, execute the command to launch the file   
data/4pane-6.0/Filetypes.cpp:2121:63:  [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).
      { wxString command; command.Printf(wxT("kdesu \"%s\""), open.c_str());
data/4pane-6.0/Filetypes.cpp:2126:64:  [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).
        { wxString command; command.Printf(wxT("gksu \"%s\""), open.c_str());
data/4pane-6.0/Filetypes.cpp:2135:82:  [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).
        wxString command; command.Printf(wxT("gnomesu --title "" -c \"%s\" -d"), open.c_str());  // -d means don't show the "Which user?" box, just use root
data/4pane-6.0/Filetypes.cpp:2140:57:  [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).
      { wxString command; command.Printf(wxT("\"%s\""), open.c_str());
data/4pane-6.0/Filetypes.h:301:36:  [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).
static void Openfunction(wxString& open, bool usingsu);         // Submethod actually to launch applic+file.  Shared by Open, Open-With, & from context submenu
data/4pane-6.0/Misc.cpp:733: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.
        m_argv = new char *[m_argc + 1];
data/4pane-6.0/MyDirs.cpp:365:1:  [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[ALIQUOT + 1];
data/4pane-6.0/MyFiles.cpp:44:36:  [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 size_t BUFLEN = 4096; char buf[BUFLEN];
data/4pane-6.0/MyFiles.cpp:63:36:  [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 size_t BUFLEN = 4096; char buf[BUFLEN];
data/4pane-6.0/MyFiles.cpp:360:1:  [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[3];                                                // A char array will hold the answers
data/4pane-6.0/MyFiles.cpp:531: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).
if (open.IsEmpty()) return;
data/4pane-6.0/MyFiles.cpp:538: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).
FiletypeManager::Openfunction(open, usingsu);                     // Do the rest in FiletypeManager submethod, shared by 'Open with' etc
data/4pane-6.0/MyFiles.cpp:1722:49:  [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 size_t bufsize = 4096; char buf[bufsize];
data/4pane-6.0/MyFiles.cpp:1735:49:  [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 size_t bufsize = 4096; char buf[bufsize];
data/4pane-6.0/MyFrame.cpp:71: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 command[256]; memset (command, 0, sizeof(command));
data/4pane-6.0/MyFrame.cpp:72:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(command, "xterm -T 'gdb' -e 'gdb -p %d'", getpid());
data/4pane-6.0/Otherstreams.h:57:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char m_pBuffer[IN_BUF_MAX];
data/4pane-6.0/Otherstreams.h:86: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 m_pBuffer[OUT_BUF_MAX];
data/4pane-6.0/Tools.cpp:3675:47:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                            cbuf.extend(len); memcpy(cbuf.data(), str.mb_str(), len);
data/4pane-6.0/Tools.cpp:3707:25:  [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(cbuf.data() + bufPos, data, length);              //  then add the available data, appending to any previously loaded
data/4pane-6.0/bzipstream.h:46: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    m_pBuffer[WXBZBS];
data/4pane-6.0/bzipstream.h:75: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    m_pBuffer[WXBZBS];
data/4pane-6.0/sdk/bzip/bzlib.c:1390:4:  [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   unused[BZ_MAX_UNUSED];
data/4pane-6.0/sdk/bzip/bzlib.c:1393:4:  [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   mode2[10]     = "";
data/4pane-6.0/sdk/bzip/bzlib.c:1425:14:  [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).
        fp = fopen(path,mode2);
data/4pane-6.0/sdk/fswatcher/MyFSWatcher.cpp:217: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[128 * sizeof(inotify_event)];
data/4pane-6.0/sdk/fswatcher/MyFSWatcher.cpp:431:17:  [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(e, &inevt, size);
data/4pane-6.0/sdk/rsvg/rsvg.cpp:139:17:  [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).
  output_file = fopen (outputfilepath.ToUTF8(), "wb");
data/4pane-6.0/ArchiveStream.cpp:313:62:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
wxStreamBuffer streambuf((wxInputStream&)in, wxStreamBuffer::read);  //  and store it first in a wxStreamBuffer (since this can cope with a stream feed)
data/4pane-6.0/ArchiveStream.cpp:1318:27:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
        mode_t oldUmask = umask(0); 
data/4pane-6.0/ArchiveStream.cpp:1331:121:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
                else { wxMessageBox(_("Sorry, you need to be root to extract character or block devices"), wxT(":-(")); umask(oldUmask); return false; }
data/4pane-6.0/ArchiveStream.cpp:1333:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
        umask(oldUmask);
data/4pane-6.0/Dup.cpp:530:25:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
      mode_t oldUmask = umask(0);           // Temporarily change umask so that permissions are copied exactly
data/4pane-6.0/Dup.cpp:532:7:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
      umask(oldUmask); return ans==0;
data/4pane-6.0/Dup.cpp:579:29:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
          mode_t oldUmask = umask(0);             // Temporarily change umask so that permissions are copied exactly
data/4pane-6.0/Dup.cpp:581:11:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
          umask(oldUmask);
data/4pane-6.0/Misc.cpp:749:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int nread = read(fd, &c, 1);                 // Get a char from the input
data/4pane-6.0/MyDirs.cpp:357:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
wxFile in(origin, wxFile::read);
data/4pane-6.0/MyDirs.cpp:374:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (!read)
data/4pane-6.0/MyDirs.cpp:377:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    size_t written = out.Write(buffer, read);
data/4pane-6.0/MyDirs.cpp:378:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (written < read)
data/4pane-6.0/MyDirs.cpp:382:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    event.SetInt(read);
data/4pane-6.0/MyDirs.cpp:385:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    total += read;
data/4pane-6.0/MyDirs.cpp:1676:29:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
          mode_t oldUmask = umask(0);                                           // Temporarily change umask so that permissions are copied exactly
data/4pane-6.0/MyDirs.cpp:1678:11:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
          umask(oldUmask);
data/4pane-6.0/MyDirs.cpp:1746:33:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
            { mode_t oldUmask = umask(0);                                       // Otherwise it's an oddity like a fifo, which makes wxCopyFile hang, so do it the linux way
data/4pane-6.0/MyDirs.cpp:1752:15:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
              umask(oldUmask);
data/4pane-6.0/sdk/bzip/bzlib.c:908:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   Int32 c = fgetc ( f );
data/4pane-6.0/sdk/bzip/bzlib.c:1418:4:  [1] (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 character.
   strcat(mode2,"b");   /* binary mode */
data/4pane-6.0/sdk/fswatcher/MyFSWatcher.cpp:536:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ssize_t left = read(m_ifd, buf, size);

ANALYSIS SUMMARY:

Hits = 85
Lines analyzed = 53180 in approximately 1.38 seconds (38416 lines/second)
Physical Source Lines of Code (SLOC) = 41551
Hits@level = [0]   3 [1]  22 [2]  43 [3]   1 [4]  17 [5]   2
Hits@level+ = [0+]  88 [1+]  85 [2+]  63 [3+]  20 [4+]  19 [5+]   2
Hits/KSLOC@level+ = [0+] 2.11788 [1+] 2.04568 [2+] 1.51621 [3+] 0.481336 [4+] 0.457269 [5+] 0.0481336
Dot directories skipped = 2 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.