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/fatcat-1.0.5/src/FatUtils.h
Examining data/fatcat-1.0.5/src/analysis/FatChain.cpp
Examining data/fatcat-1.0.5/src/analysis/FatChain.h
Examining data/fatcat-1.0.5/src/analysis/FatChains.cpp
Examining data/fatcat-1.0.5/src/analysis/FatChains.h
Examining data/fatcat-1.0.5/src/analysis/FatExtract.cpp
Examining data/fatcat-1.0.5/src/analysis/FatExtract.h
Examining data/fatcat-1.0.5/src/analysis/FatFix.cpp
Examining data/fatcat-1.0.5/src/analysis/FatFix.h
Examining data/fatcat-1.0.5/src/analysis/FatSearch.cpp
Examining data/fatcat-1.0.5/src/analysis/FatSearch.h
Examining data/fatcat-1.0.5/src/analysis/FatWalk.cpp
Examining data/fatcat-1.0.5/src/analysis/FatWalk.h
Examining data/fatcat-1.0.5/src/core/FatDate.cpp
Examining data/fatcat-1.0.5/src/core/FatDate.h
Examining data/fatcat-1.0.5/src/core/FatEntry.cpp
Examining data/fatcat-1.0.5/src/core/FatEntry.h
Examining data/fatcat-1.0.5/src/core/FatFilename.cpp
Examining data/fatcat-1.0.5/src/core/FatFilename.h
Examining data/fatcat-1.0.5/src/core/FatModule.cpp
Examining data/fatcat-1.0.5/src/core/FatModule.h
Examining data/fatcat-1.0.5/src/core/FatPath.cpp
Examining data/fatcat-1.0.5/src/core/FatPath.h
Examining data/fatcat-1.0.5/src/core/FatSystem.cpp
Examining data/fatcat-1.0.5/src/core/FatSystem.h
Examining data/fatcat-1.0.5/src/fatcat.cpp
Examining data/fatcat-1.0.5/src/table/FatBackup.cpp
Examining data/fatcat-1.0.5/src/table/FatBackup.h
Examining data/fatcat-1.0.5/src/table/FatDiff.cpp
Examining data/fatcat-1.0.5/src/table/FatDiff.h

FINAL RESULTS:

data/fatcat-1.0.5/src/analysis/FatChains.cpp:20:33:  [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.
FatChains::FatChains(FatSystem &system)
data/fatcat-1.0.5/src/analysis/FatChains.cpp:21:17:  [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.
    : FatModule(system),
data/fatcat-1.0.5/src/analysis/FatChains.cpp:29:5:  [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.enableCache();
data/fatcat-1.0.5/src/analysis/FatChains.cpp:48:43:  [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.
    recursiveExploration(chains, visited, system.rootDirectory);
data/fatcat-1.0.5/src/analysis/FatChains.cpp:73:44:  [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.
                vector<FatEntry> entries = system.getEntries(chain.startCluster);
data/fatcat-1.0.5/src/analysis/FatChains.cpp:95:28:  [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 (!exploreDamaged && system.nextCluster(cluster) == 0) {
data/fatcat-1.0.5/src/analysis/FatChains.cpp:110:19:  [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.
        entries = system.getEntries(cluster);
data/fatcat-1.0.5/src/analysis/FatChains.cpp:186:22:  [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.
    for (int cluster=system.rootDirectory; cluster<system.totalClusters; cluster++) {
data/fatcat-1.0.5/src/analysis/FatChains.cpp:186:52:  [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.
    for (int cluster=system.rootDirectory; cluster<system.totalClusters; cluster++) {
data/fatcat-1.0.5/src/analysis/FatChains.cpp:190:18:  [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.freeCluster(cluster)) {
data/fatcat-1.0.5/src/analysis/FatChains.cpp:196:31:  [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.
                    int tmp = system.nextCluster(next);
data/fatcat-1.0.5/src/analysis/FatChains.cpp:197:45:  [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 (tmp == FAT_LAST || !system.validCluster(tmp)) {
data/fatcat-1.0.5/src/analysis/FatChains.cpp:215:43:  [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 (chain.startCluster == system.rootDirectory) {
data/fatcat-1.0.5/src/analysis/FatChains.cpp:250:43:  [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.
                chain.size = chain.length*system.bytesPerCluster;
data/fatcat-1.0.5/src/analysis/FatChains.cpp:299:17:  [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.list(mit->second);
data/fatcat-1.0.5/src/analysis/FatChains.cpp:324:19:  [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.
        cluster = system.nextCluster(cluster);
data/fatcat-1.0.5/src/analysis/FatChains.cpp:325:13:  [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.validCluster(cluster) && cluster!=FAT_LAST) {
data/fatcat-1.0.5/src/analysis/FatChains.h:20:30:  [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.
        FatChains(FatSystem &system);
data/fatcat-1.0.5/src/analysis/FatExtract.cpp:10:35:  [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.
FatExtract::FatExtract(FatSystem &system)
data/fatcat-1.0.5/src/analysis/FatExtract.cpp:11:15:  [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.
    : FatWalk(system)
data/fatcat-1.0.5/src/analysis/FatExtract.cpp:34: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.readFile(entry.cluster, entry.size, output, contiguous);
data/fatcat-1.0.5/src/analysis/FatExtract.h:14:31:  [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.
        FatExtract(FatSystem &system);
data/fatcat-1.0.5/src/analysis/FatFix.cpp:7:27:  [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.
FatFix::FatFix(FatSystem &system)
data/fatcat-1.0.5/src/analysis/FatFix.cpp:8:15:  [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.
    : FatWalk(system)
data/fatcat-1.0.5/src/analysis/FatFix.cpp:15:5:  [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.enableWrite();
data/fatcat-1.0.5/src/analysis/FatFix.cpp:23: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.
    if (system.freeCluster(cluster)) {
data/fatcat-1.0.5/src/analysis/FatFix.cpp:26:13:  [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.getEntries(entry.cluster, &size);
data/fatcat-1.0.5/src/analysis/FatFix.cpp:31:48:  [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.
            fixChain(entry.cluster, entry.size/system.bytesPerCluster+1);
data/fatcat-1.0.5/src/analysis/FatFix.cpp:48:14:  [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.freeCluster(cluster+i)) {
data/fatcat-1.0.5/src/analysis/FatFix.cpp:56:17:  [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.freeCluster(cluster+i)) {
data/fatcat-1.0.5/src/analysis/FatFix.cpp:58:21:  [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.writeNextCluster(cluster+i, FAT_LAST, 0);
data/fatcat-1.0.5/src/analysis/FatFix.cpp:59:21:  [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.writeNextCluster(cluster+i, FAT_LAST, 1);
data/fatcat-1.0.5/src/analysis/FatFix.cpp:61:21:  [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.writeNextCluster(cluster+i, cluster+i+1, 0);
data/fatcat-1.0.5/src/analysis/FatFix.cpp:62:21:  [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.writeNextCluster(cluster+i, cluster+i+1, 1);
data/fatcat-1.0.5/src/analysis/FatFix.h:14:27:  [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.
        FatFix(FatSystem &system);
data/fatcat-1.0.5/src/analysis/FatSearch.cpp:7:33:  [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.
FatSearch::FatSearch(FatSystem &system)
data/fatcat-1.0.5/src/analysis/FatSearch.cpp:8:15:  [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.
    : FatWalk(system),
data/fatcat-1.0.5/src/analysis/FatSearch.cpp:31: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.list(tmp);
data/fatcat-1.0.5/src/analysis/FatSearch.h:14:30:  [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.
        FatSearch(FatSystem &system);
data/fatcat-1.0.5/src/analysis/FatWalk.cpp:3:29:  [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.
FatWalk::FatWalk(FatSystem &system)
data/fatcat-1.0.5/src/analysis/FatWalk.cpp:4:17:  [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.
    : FatModule(system),
data/fatcat-1.0.5/src/analysis/FatWalk.cpp:13:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if (cluster == system.rootDirectory) {
data/fatcat-1.0.5/src/analysis/FatWalk.cpp:14:16:  [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.
        root = system.rootEntry();
data/fatcat-1.0.5/src/analysis/FatWalk.cpp:35:32:  [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.
    vector<FatEntry> entries = system.getEntries(cluster);
data/fatcat-1.0.5/src/analysis/FatWalk.h:21:28:  [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.
        FatWalk(FatSystem &system);
data/fatcat-1.0.5/src/core/FatModule.cpp:4:7:  [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(system_)
data/fatcat-1.0.5/src/core/FatModule.h:9:30:  [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.
        FatModule(FatSystem &system);
data/fatcat-1.0.5/src/core/FatModule.h:12:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        FatSystem &system;
data/fatcat-1.0.5/src/table/FatBackup.cpp:12:33:  [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.
FatBackup::FatBackup(FatSystem &system)
data/fatcat-1.0.5/src/table/FatBackup.cpp:13:17:  [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.
    : FatModule(system)
data/fatcat-1.0.5/src/table/FatBackup.cpp:20:16:  [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.
    int size = system.fatSize;
data/fatcat-1.0.5/src/table/FatBackup.cpp:29:18:  [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.
        offset = system.fatSize;
data/fatcat-1.0.5/src/table/FatBackup.cpp:43:13:  [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.
        n = system.readData(system.fatStart+i+offset, buffer, toRead);
data/fatcat-1.0.5/src/table/FatBackup.cpp:43:29:  [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.
        n = system.readData(system.fatStart+i+offset, buffer, toRead);
data/fatcat-1.0.5/src/table/FatBackup.cpp:66:5:  [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.enableWrite();
data/fatcat-1.0.5/src/table/FatBackup.cpp:70:16:  [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.
    int size = system.fatSize;
data/fatcat-1.0.5/src/table/FatBackup.cpp:77:18:  [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.
        offset = system.fatSize;
data/fatcat-1.0.5/src/table/FatBackup.cpp:85:17:  [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.
            n = system.writeData(system.fatStart+offset+position, buffer, toWrite);
data/fatcat-1.0.5/src/table/FatBackup.cpp:85:34:  [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.
            n = system.writeData(system.fatStart+offset+position, buffer, toWrite);
data/fatcat-1.0.5/src/table/FatBackup.h:13:30:  [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.
        FatBackup(FatSystem &system);
data/fatcat-1.0.5/src/table/FatDiff.cpp:8:29:  [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.
FatDiff::FatDiff(FatSystem &system)
data/fatcat-1.0.5/src/table/FatDiff.cpp:9:17:  [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.
    : FatModule(system)
data/fatcat-1.0.5/src/table/FatDiff.cpp:19:33:  [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.
    for (int cluster=0; cluster<system.totalClusters; cluster++) {
data/fatcat-1.0.5/src/table/FatDiff.cpp:20:17:  [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.
        int A = system.nextCluster(cluster, 0);
data/fatcat-1.0.5/src/table/FatDiff.cpp:21:17:  [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.
        int B = system.nextCluster(cluster, 1);
data/fatcat-1.0.5/src/table/FatDiff.cpp:52:5:  [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.enableWrite();
data/fatcat-1.0.5/src/table/FatDiff.cpp:54:33:  [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.
    for (int cluster=0; cluster<system.totalClusters; cluster++) {
data/fatcat-1.0.5/src/table/FatDiff.cpp:55:17:  [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.
        int A = system.nextCluster(cluster, 0);
data/fatcat-1.0.5/src/table/FatDiff.cpp:56:17:  [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.
        int B = system.nextCluster(cluster, 1);
data/fatcat-1.0.5/src/table/FatDiff.cpp:60:13:  [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.writeNextCluster(cluster, A+B, 0);
data/fatcat-1.0.5/src/table/FatDiff.cpp:61:13:  [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.writeNextCluster(cluster, A+B, 1);
data/fatcat-1.0.5/src/table/FatDiff.h:9:28:  [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.
        FatDiff(FatSystem &system);
data/fatcat-1.0.5/src/core/FatSystem.cpp:719:41:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
void FatSystem::rewriteUnallocated(bool random)
data/fatcat-1.0.5/src/core/FatSystem.cpp:722:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(time(NULL));
data/fatcat-1.0.5/src/core/FatSystem.cpp:727:21:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                if (random) {
data/fatcat-1.0.5/src/fatcat.cpp:148:21:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((index = getopt(argc, argv, "il:L:r:R:s:dc:hx:2@:ob:p:w:v:mt:Sze:O:fk:a:")) != -1) {
data/fatcat-1.0.5/src/analysis/FatExtract.cpp:33:24:  [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).
        FILE *output = fopen(target.c_str(), "w+");
data/fatcat-1.0.5/src/core/FatDate.cpp:31: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[128];
data/fatcat-1.0.5/src/core/FatDate.cpp:32: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(buffer, "%d/%d/%04d %02d:%02d:%02d", d, m, y, h, i, s);
data/fatcat-1.0.5/src/core/FatSystem.cpp:36: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).
    fd = open(filename.c_str(), O_RDONLY|O_LARGEFILE);
data/fatcat-1.0.5/src/core/FatSystem.cpp:62: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).
    fd = open(filename.c_str(), O_RDWR|O_LARGEFILE);
data/fatcat-1.0.5/src/core/FatSystem.cpp:131: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[128];
data/fatcat-1.0.5/src/core/FatSystem.cpp:195: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[bytes];
data/fatcat-1.0.5/src/core/FatSystem.cpp:247: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[bytes];
data/fatcat-1.0.5/src/core/FatSystem.cpp:333: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[FAT_ENTRY_SIZE];
data/fatcat-1.0.5/src/core/FatSystem.cpp:507: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[bytesPerCluster];
data/fatcat-1.0.5/src/core/FatSystem.cpp:725:13:  [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[bytesPerCluster];
data/fatcat-1.0.5/src/fatcat.cpp:17:32:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
#define ATOU(i) ((unsigned int)atoi(i))
data/fatcat-1.0.5/src/fatcat.cpp:152:30:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                attributes = atoi(optarg);
data/fatcat-1.0.5/src/fatcat.cpp:156:27:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                cluster = atoi(optarg);
data/fatcat-1.0.5/src/table/FatBackup.cpp:19: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[CHUNKS_SIZES];
data/fatcat-1.0.5/src/table/FatBackup.cpp:23:20:  [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).
    FILE *backup = fopen(backupFile.c_str(), "w+");
data/fatcat-1.0.5/src/table/FatBackup.cpp:55: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[CHUNKS_SIZES];
data/fatcat-1.0.5/src/table/FatBackup.cpp:58:20:  [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).
    FILE *backup = fopen(backupFile.c_str(), "r");
data/fatcat-1.0.5/src/core/FatSystem.cpp:93:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        n = read(fd, buffer+pos, size);

ANALYSIS SUMMARY:

Hits = 95
Lines analyzed = 2780 in approximately 0.24 seconds (11750 lines/second)
Physical Source Lines of Code (SLOC) = 2102
Hits@level = [0]  38 [1]   1 [2]  18 [3]   4 [4]  72 [5]   0
Hits@level+ = [0+] 133 [1+]  95 [2+]  94 [3+]  76 [4+]  72 [5+]   0
Hits/KSLOC@level+ = [0+] 63.2731 [1+] 45.1951 [2+] 44.7193 [3+] 36.156 [4+] 34.2531 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.