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/securefs-0.11.1+ds/external/optional.hpp
Examining data/securefs-0.11.1+ds/external/thread_safety_annotations.hpp
Examining data/securefs-0.11.1+ds/main.cpp
Examining data/securefs-0.11.1+ds/sources/apple_xattr_workaround.cpp
Examining data/securefs-0.11.1+ds/sources/apple_xattr_workaround.h
Examining data/securefs-0.11.1+ds/sources/btree_dir.cpp
Examining data/securefs-0.11.1+ds/sources/btree_dir.h
Examining data/securefs-0.11.1+ds/sources/commands.h
Examining data/securefs-0.11.1+ds/sources/common_platform.cpp
Examining data/securefs-0.11.1+ds/sources/constants.h
Examining data/securefs-0.11.1+ds/sources/crypto.cpp
Examining data/securefs-0.11.1+ds/sources/crypto.h
Examining data/securefs-0.11.1+ds/sources/exceptions.cpp
Examining data/securefs-0.11.1+ds/sources/exceptions.h
Examining data/securefs-0.11.1+ds/sources/file_table.cpp
Examining data/securefs-0.11.1+ds/sources/file_table.h
Examining data/securefs-0.11.1+ds/sources/files.cpp
Examining data/securefs-0.11.1+ds/sources/files.h
Examining data/securefs-0.11.1+ds/sources/git-version.h
Examining data/securefs-0.11.1+ds/sources/lite_fs.cpp
Examining data/securefs-0.11.1+ds/sources/lite_fs.h
Examining data/securefs-0.11.1+ds/sources/lite_operations.cpp
Examining data/securefs-0.11.1+ds/sources/lite_operations.h
Examining data/securefs-0.11.1+ds/sources/lite_stream.cpp
Examining data/securefs-0.11.1+ds/sources/lite_stream.h
Examining data/securefs-0.11.1+ds/sources/lock_enabled.cpp
Examining data/securefs-0.11.1+ds/sources/lock_enabled.h
Examining data/securefs-0.11.1+ds/sources/lock_guard.h
Examining data/securefs-0.11.1+ds/sources/logger.cpp
Examining data/securefs-0.11.1+ds/sources/logger.h
Examining data/securefs-0.11.1+ds/sources/mystring.h
Examining data/securefs-0.11.1+ds/sources/myutils.cpp
Examining data/securefs-0.11.1+ds/sources/myutils.h
Examining data/securefs-0.11.1+ds/sources/operations.cpp
Examining data/securefs-0.11.1+ds/sources/operations.h
Examining data/securefs-0.11.1+ds/sources/platform.h
Examining data/securefs-0.11.1+ds/sources/scrypt.cpp
Examining data/securefs-0.11.1+ds/sources/streams.cpp
Examining data/securefs-0.11.1+ds/sources/streams.h
Examining data/securefs-0.11.1+ds/sources/unix.cpp
Examining data/securefs-0.11.1+ds/sources/win.cpp
Examining data/securefs-0.11.1+ds/sources/commands.cpp
Examining data/securefs-0.11.1+ds/sources/mystring.cpp
Examining data/securefs-0.11.1+ds/test/main.cpp
Examining data/securefs-0.11.1+ds/test/test_btree.cpp
Examining data/securefs-0.11.1+ds/test/test_crypto.cpp
Examining data/securefs-0.11.1+ds/test/test_files.cpp
Examining data/securefs-0.11.1+ds/test/test_streams.cpp
Examining data/securefs-0.11.1+ds/test/test_utils.cpp
Examining data/securefs-0.11.1+ds/test/test_win.cpp
Examining data/securefs-0.11.1+ds/test/test_xattr_workaround.cpp

FINAL RESULTS:

data/securefs-0.11.1+ds/sources/lite_fs.cpp:215:41:  [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.
            ssize_t link_size = m_root->readlink(enc_path, &buffer[0], buffer.size());
data/securefs-0.11.1+ds/sources/lite_fs.cpp:253:22:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    void FileSystem::chmod(StringRef path, fuse_mode_t mode)
data/securefs-0.11.1+ds/sources/lite_fs.cpp:262:17:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
        m_root->chmod(translate_path(path, false), mode);
data/securefs-0.11.1+ds/sources/lite_fs.cpp:265:22:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
    void FileSystem::chown(StringRef path, fuse_uid_t uid, fuse_gid_t gid)
data/securefs-0.11.1+ds/sources/lite_fs.cpp:267:17:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
        m_root->chown(translate_path(path, false), uid, gid);
data/securefs-0.11.1+ds/sources/lite_fs.cpp:270:24:  [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.
    size_t FileSystem::readlink(StringRef path, char* buf, size_t size)
data/securefs-0.11.1+ds/sources/lite_fs.cpp:278:17:  [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.
        m_root->readlink(translate_path(path, false), underbuf.get(), max_size - 1);
data/securefs-0.11.1+ds/sources/lite_fs.h:141:14:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
        void chmod(StringRef path, fuse_mode_t mode);
data/securefs-0.11.1+ds/sources/lite_fs.h:142:14:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
        void chown(StringRef path, fuse_uid_t uid, fuse_gid_t gid);
data/securefs-0.11.1+ds/sources/lite_fs.h:147:16:  [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.
        size_t readlink(StringRef path, char* buf, size_t size);
data/securefs-0.11.1+ds/sources/lite_operations.cpp:359:9:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    int chmod(const char* path, fuse_mode_t mode)
data/securefs-0.11.1+ds/sources/lite_operations.cpp:364:25:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
            filesystem->chmod(path, mode);
data/securefs-0.11.1+ds/sources/lite_operations.cpp:370:9:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
    int chown(const char* path, fuse_uid_t uid, fuse_gid_t gid)
data/securefs-0.11.1+ds/sources/lite_operations.cpp:375:25:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
            filesystem->chown(path, uid, gid);
data/securefs-0.11.1+ds/sources/lite_operations.cpp:407:9:  [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 readlink(const char* path, char* buf, size_t size)
data/securefs-0.11.1+ds/sources/lite_operations.cpp:412:31:  [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.
            (void)filesystem->readlink(path, buf, size);
data/securefs-0.11.1+ds/sources/lite_operations.cpp:595:41:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
        opt->chmod = &::securefs::lite::chmod;
data/securefs-0.11.1+ds/sources/lite_operations.cpp:596:41:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
        opt->chown = &::securefs::lite::chown;
data/securefs-0.11.1+ds/sources/lite_operations.cpp:599:44:  [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.
        opt->readlink = &::securefs::lite::readlink;
data/securefs-0.11.1+ds/sources/lite_operations.h:52:9:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    int chmod(const char*, fuse_mode_t);
data/securefs-0.11.1+ds/sources/lite_operations.h:58:9:  [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 readlink(const char* path, char* buf, size_t size);
data/securefs-0.11.1+ds/sources/operations.cpp:488:9:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    int chmod(const char* path, fuse_mode_t mode)
data/securefs-0.11.1+ds/sources/operations.cpp:505:9:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
    int chown(const char* path, fuse_uid_t uid, fuse_gid_t gid)
data/securefs-0.11.1+ds/sources/operations.cpp:538:9:  [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 readlink(const char* path, char* buf, size_t size)
data/securefs-0.11.1+ds/sources/operations.cpp:785:45:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
        opt->chmod = &securefs::operations::chmod;
data/securefs-0.11.1+ds/sources/operations.cpp:786:45:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
        opt->chown = &securefs::operations::chown;
data/securefs-0.11.1+ds/sources/operations.cpp:789:48:  [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.
        opt->readlink = &securefs::operations::readlink;
data/securefs-0.11.1+ds/sources/operations.h:150:9:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    int chmod(const char*, fuse_mode_t);
data/securefs-0.11.1+ds/sources/operations.h:152:9:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
    int chown(const char* path, fuse_uid_t uid, fuse_gid_t gid);
data/securefs-0.11.1+ds/sources/operations.h:156:9:  [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 readlink(const char* path, char* buf, size_t size);
data/securefs-0.11.1+ds/sources/platform.h:182:10:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    void chmod(StringRef path, fuse_mode_t mode) const;
data/securefs-0.11.1+ds/sources/platform.h:183:10:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
    void chown(StringRef path, fuse_uid_t uid, fuse_gid_t gid) const;
data/securefs-0.11.1+ds/sources/platform.h:184:13:  [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.
    ssize_t readlink(StringRef path, char* output, size_t size) const;
data/securefs-0.11.1+ds/sources/unix.cpp:392:17:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
void OSService::chmod(StringRef path, fuse_mode_t mode) const
data/securefs-0.11.1+ds/sources/unix.cpp:402:17:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
void OSService::chown(StringRef path, uid_t uid, gid_t gid) const
data/securefs-0.11.1+ds/sources/unix.cpp:415:20:  [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.
ssize_t OSService::readlink(StringRef path, char* output, size_t size) const
data/securefs-0.11.1+ds/sources/win.cpp:925:17:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
void OSService::chmod(StringRef path, fuse_mode_t mode) const { (void)0; }
data/securefs-0.11.1+ds/sources/win.cpp:926:17:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
void OSService::chown(StringRef, fuse_uid_t, fuse_gid_t) const { (void)0; }
data/securefs-0.11.1+ds/sources/win.cpp:928:20:  [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.
ssize_t OSService::readlink(StringRef path, char* output, size_t size) const
data/securefs-0.11.1+ds/sources/files.cpp:149:16:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
    m_stream = crypt.first;
data/securefs-0.11.1+ds/sources/files.cpp:150:16:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
    m_header = crypt.second;
data/securefs-0.11.1+ds/sources/logger.cpp:67:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(m_fp, format, args);
data/securefs-0.11.1+ds/sources/logger.h:62:31:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        __attribute__((format(printf, 5, 6)))
data/securefs-0.11.1+ds/sources/mystring.cpp:21:16:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    int size = vsnprintf(buffer, sizeof(buffer), format, copied_args);
data/securefs-0.11.1+ds/sources/mystring.cpp:28:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(&result[0], size + 1, format, args);
data/securefs-0.11.1+ds/sources/mystring.h:128:27:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__((format(printf, 1, 2)))
data/securefs-0.11.1+ds/sources/commands.cpp:1017:42:  [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.
        const char* copyfile_disable = ::getenv("COPYFILE_DISABLE");
data/securefs-0.11.1+ds/sources/common_platform.cpp:15:10:  [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.
    byte random[16];
data/securefs-0.11.1+ds/sources/common_platform.cpp:16: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.
    generate_random(random, array_length(random));
data/securefs-0.11.1+ds/sources/common_platform.cpp:16:42:  [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.
    generate_random(random, array_length(random));
data/securefs-0.11.1+ds/sources/common_platform.cpp:20:26:  [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.
    result.append(hexify(random, array_length(random)));
data/securefs-0.11.1+ds/sources/common_platform.cpp:20:47:  [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.
    result.append(hexify(random, array_length(random)));
data/securefs-0.11.1+ds/sources/unix.cpp:290:18:  [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* rc = ::realpath(path.c_str(), buffer);
data/securefs-0.11.1+ds/sources/apple_xattr_workaround.cpp:33:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(buffer + i, APPLE_FINDER_INFO, sizeof(APPLE_FINDER_INFO));
data/securefs-0.11.1+ds/sources/btree_dir.cpp:39:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(value.data(), buffer, size);
data/securefs-0.11.1+ds/sources/btree_dir.cpp:48:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buffer, &value, sizeof(value));
data/securefs-0.11.1+ds/sources/btree_dir.cpp:56:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buffer, value.data(), sizeof(value));
data/securefs-0.11.1+ds/sources/btree_dir.cpp:662:16:  [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* fp = fopen(filename, "w");
data/securefs-0.11.1+ds/sources/commands.cpp:471: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[4000];
data/securefs-0.11.1+ds/sources/commands.cpp:500:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(out_key->data(), in_key.data(), out_key->size());
data/securefs-0.11.1+ds/sources/crypto.cpp:102:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(padded, plaintext, text_len);
data/securefs-0.11.1+ds/sources/crypto.cpp:122:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(modded_iv, siv, AES_SIV::IV_SIZE);
data/securefs-0.11.1+ds/sources/crypto.cpp:141:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(temp_iv, siv, AES_SIV::IV_SIZE);
data/securefs-0.11.1+ds/sources/exceptions.h:134:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(m_id.data(), id.data(), id.size());
data/securefs-0.11.1+ds/sources/exceptions.h:154:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(m_id.data(), id.data(), id.size());
data/securefs-0.11.1+ds/sources/exceptions.h:174:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(m_id.data(), id.data(), id.size());
data/securefs-0.11.1+ds/sources/file_table.cpp:28: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).
    virtual FileStreamPtrPair open(const id_type& id) = 0;
data/securefs-0.11.1+ds/sources/file_table.cpp:62:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FileStreamPtrPair open(const id_type& id) override
data/securefs-0.11.1+ds/sources/file_table.cpp:116:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FileStreamPtrPair open(const id_type& id) override
data/securefs-0.11.1+ds/sources/file_table.cpp:154:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(m_master_key.data(), master_key.data(), master_key.size());
data/securefs-0.11.1+ds/sources/file_table.cpp:195:41:  [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).
    std::tie(data_fd, meta_fd) = m_fio->open(id);
data/securefs-0.11.1+ds/sources/files.cpp:135:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data_key.data(), generated_keys, KEY_LENGTH);
data/securefs-0.11.1+ds/sources/files.cpp:136:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(meta_key.data(), generated_keys + KEY_LENGTH, KEY_LENGTH);
data/securefs-0.11.1+ds/sources/files.cpp:289:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(header.get(), get_id().data(), ID_LENGTH);
data/securefs-0.11.1+ds/sources/files.cpp:290:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(header.get() + ID_LENGTH, name, name_len);
data/securefs-0.11.1+ds/sources/files.cpp:350:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(header.get(), get_id().data(), ID_LENGTH);
data/securefs-0.11.1+ds/sources/files.cpp:351:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(header.get() + ID_LENGTH, name, name_len);
data/securefs-0.11.1+ds/sources/files.cpp:375: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[Directory::MAX_FILENAME_LENGTH + 1 + 32 + 4];
data/securefs-0.11.1+ds/sources/files.cpp:386:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(value.first.data(), buffer + Directory::MAX_FILENAME_LENGTH + 1, ID_LENGTH);
data/securefs-0.11.1+ds/sources/files.cpp:399:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(id.data(), it->second.first.data(), id.size());
data/securefs-0.11.1+ds/sources/files.cpp:419:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(id.data(), it->second.first.data(), id.size());
data/securefs-0.11.1+ds/sources/files.cpp:431: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[Directory::MAX_FILENAME_LENGTH + 1 + 32 + 4];
data/securefs-0.11.1+ds/sources/files.cpp:438:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(buffer, pair.first.data(), pair.first.size());
data/securefs-0.11.1+ds/sources/files.cpp:439:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(buffer + MAX_FILENAME_LENGTH + 1, pair.second.first.data(), ID_LENGTH);
data/securefs-0.11.1+ds/sources/lite_fs.cpp:165: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).
    AutoClosedFile FileSystem::open(StringRef path, int flags, fuse_mode_t mode)
data/securefs-0.11.1+ds/sources/lite_fs.cpp:281:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buf, resolved.data(), copy_size);
data/securefs-0.11.1+ds/sources/lite_fs.h:137: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).
        AutoClosedFile open(StringRef path, int flags, fuse_mode_t mode);
data/securefs-0.11.1+ds/sources/lite_operations.cpp:57:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(name_key.data(), ctx->opt->master_key.data(), KEY_LENGTH);
data/securefs-0.11.1+ds/sources/lite_operations.cpp:58:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(content_key.data(), ctx->opt->master_key.data() + KEY_LENGTH, KEY_LENGTH);
data/securefs-0.11.1+ds/sources/lite_operations.cpp:59:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(xattr_key.data(), ctx->opt->master_key.data() + 2 * KEY_LENGTH, KEY_LENGTH);
data/securefs-0.11.1+ds/sources/lite_operations.cpp:216:47:  [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).
            AutoClosedFile file = filesystem->open(path, O_RDWR | O_CREAT | O_EXCL, mode);
data/securefs-0.11.1+ds/sources/lite_operations.cpp:223: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).
    int open(const char* path, struct fuse_file_info* info)
data/securefs-0.11.1+ds/sources/lite_operations.cpp:228:47:  [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).
            AutoClosedFile file = filesystem->open(path, info->flags, 0644);
data/securefs-0.11.1+ds/sources/lite_operations.cpp:457:45:  [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).
            AutoClosedFile fp = filesystem->open(path, O_RDWR, 0644);
data/securefs-0.11.1+ds/sources/lite_operations.cpp:584:40:  [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).
        opt->open = &::securefs::lite::open;
data/securefs-0.11.1+ds/sources/lite_operations.h:32: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).
    int open(const char*, struct fuse_file_info*);
data/securefs-0.11.1+ds/sources/logger.cpp:108:16:  [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* fp = fopen(path.c_str(), "a");
data/securefs-0.11.1+ds/sources/mystring.cpp:20: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[MAX_SIZE + 1];
data/securefs-0.11.1+ds/sources/mystring.cpp:333: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 tmp[10];
data/securefs-0.11.1+ds/sources/myutils.h:179:48:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    PODArray(const PODArray& other) noexcept { memcpy(m_data, other.m_data, size()); }
data/securefs-0.11.1+ds/sources/myutils.h:248:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&value, id.data() + (id.size() - sizeof(size_t)), sizeof(size_t));
data/securefs-0.11.1+ds/sources/operations.cpp:334: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).
    int open(const char* path, struct fuse_file_info* info)
data/securefs-0.11.1+ds/sources/operations.cpp:549:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(buf, destination.data(), std::min(destination.size(), size - 1));
data/securefs-0.11.1+ds/sources/operations.cpp:774:44:  [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).
        opt->open = &securefs::operations::open;
data/securefs-0.11.1+ds/sources/operations.h:94:13:  [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(result.data(), key.data(), key.size());
data/securefs-0.11.1+ds/sources/operations.h:130: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).
    int open(const char*, struct fuse_file_info*);
data/securefs-0.11.1+ds/sources/streams.cpp:34:13:  [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(m_id.data(), id.data(), id.size());
data/securefs-0.11.1+ds/sources/streams.cpp:188:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(output, buffer.data() + begin, end - begin);
data/securefs-0.11.1+ds/sources/streams.cpp:214:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buffer.data() + begin, input, end - begin);
data/securefs-0.11.1+ds/sources/streams.cpp:520:13:  [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(output, buffer.data(), std::min(length, rc));
data/securefs-0.11.1+ds/sources/streams.cpp:535:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(buffer.data(), input, length);
data/securefs-0.11.1+ds/sources/unix.cpp:289: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[PATH_MAX + 1] = {0};
data/securefs-0.11.1+ds/sources/unix.cpp:297: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).
    int dir_fd = ::open(path.c_str(), O_RDONLY);
data/securefs-0.11.1+ds/sources/unix.cpp:568:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(output->data(), buffer, bufsize);
data/securefs-0.11.1+ds/sources/unix.cpp:617: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[4000];
data/securefs-0.11.1+ds/sources/win.cpp:77:9:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        wchar_t system_buffer[2000];
data/securefs-0.11.1+ds/sources/win.cpp:78:9:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        wchar_t final_buffer[6000];
data/securefs-0.11.1+ds/sources/win.cpp:573:9:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        wchar_t fsname[128];
data/securefs-0.11.1+ds/sources/win.cpp:696: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.
                const char buffer[4096] = {0};
data/securefs-0.11.1+ds/sources/win.cpp:796:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t resolved[4000];
data/securefs-0.11.1+ds/sources/win.cpp:1083:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(output->data(), buffer, bufsize);
data/securefs-0.11.1+ds/sources/win.cpp:1099: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[4000];
data/securefs-0.11.1+ds/sources/win.cpp:1128:14:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    int sz = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), static_cast<int>(str.size()), nullptr, 0);
data/securefs-0.11.1+ds/sources/win.cpp:1132:5:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    MultiByteToWideChar(CP_UTF8, 0, str.c_str(), static_cast<int>(str.size()), &result[0], sz);
data/securefs-0.11.1+ds/test/test_crypto.cpp:167: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 plaintext[sizeof(ciphertext) + 1] = {0};
data/securefs-0.11.1+ds/test/test_streams.cpp:141:13:  [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(output, m_buffer[block_number].data(), m_buffer[block_number].size());
data/securefs-0.11.1+ds/test/test_streams.cpp:152:13:  [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(m_buffer[block_number].data(), input, length);
data/securefs-0.11.1+ds/test/test_utils.cpp:86: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[4000];
data/securefs-0.11.1+ds/sources/btree_dir.cpp:134:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    dir_check(m_stream->read(buffer, num * BLOCK_SIZE, BLOCK_SIZE) == BLOCK_SIZE);
data/securefs-0.11.1+ds/sources/btree_dir.cpp:389:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    dir_check(m_stream->read(buffer, num * BLOCK_SIZE, BLOCK_SIZE) == BLOCK_SIZE);
data/securefs-0.11.1+ds/sources/commands.cpp:337:38:  [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).
                                     strlen(get_version_header(version)),
data/securefs-0.11.1+ds/sources/commands.cpp:446:39:  [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).
                                      strlen(get_version_header(version)),
data/securefs-0.11.1+ds/sources/commands.cpp:593:29:  [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).
                            strlen(EMPTY_PASSWORD_WHEN_KEY_FILE_IS_USED));
data/securefs-0.11.1+ds/sources/commands.cpp:773:33:  [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).
                                strlen(EMPTY_PASSWORD_WHEN_KEY_FILE_IS_USED));
data/securefs-0.11.1+ds/sources/commands.cpp:782:33:  [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).
                                strlen(EMPTY_PASSWORD_WHEN_KEY_FILE_IS_USED));
data/securefs-0.11.1+ds/sources/commands.cpp:991:17:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (getchar() != 'y')
data/securefs-0.11.1+ds/sources/commands.cpp:1316:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            fs->read(buffer.data(), 0, buffer.size());
data/securefs-0.11.1+ds/sources/files.cpp:287:21:  [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).
    auto name_len = strlen(name);
data/securefs-0.11.1+ds/sources/files.cpp:348:21:  [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).
    auto name_len = strlen(name);
data/securefs-0.11.1+ds/sources/files.cpp:381:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        auto rv = this->m_stream->read(buffer, off, array_length(buffer));
data/securefs-0.11.1+ds/sources/files.h:307:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    length_type read(void* output, offset_type off, length_type len)
data/securefs-0.11.1+ds/sources/files.h:310:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        return this->m_stream->read(output, off, len);
data/securefs-0.11.1+ds/sources/files.h:343:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        auto rc = m_stream->read(&result[0], 0, result.size());
data/securefs-0.11.1+ds/sources/lite_fs.h:54:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        length_type read(void* output, offset_type off, length_type len)
data/securefs-0.11.1+ds/sources/lite_fs.h:57:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            return m_crypt_stream->read(output, off, len);
data/securefs-0.11.1+ds/sources/lite_operations.cpp:247:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(const char* path, char* buf, size_t size, fuse_off_t offset, struct fuse_file_info* info)
data/securefs-0.11.1+ds/sources/lite_operations.cpp:257:41:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            return static_cast<int>(fp->read(buf, offset, size));
data/securefs-0.11.1+ds/sources/lite_operations.cpp:586:40:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        opt->read = &::securefs::lite::read;
data/securefs-0.11.1+ds/sources/lite_operations.h:36:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int read(const char*, char*, size_t, fuse_off_t, struct fuse_file_info*);
data/securefs-0.11.1+ds/sources/lite_stream.cpp:36:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        auto rc = m_stream->read(header.data(), 0, header.size());
data/securefs-0.11.1+ds/sources/lite_stream.cpp:77:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            = m_stream->read(m_buffer.get(),
data/securefs-0.11.1+ds/sources/mystring.h:102:41:  [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.
    return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin());
data/securefs-0.11.1+ds/sources/myutils.cpp:27:79:  [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).
            std::string total_name = dir + "/" + name.substr(0, name.size() - strlen(".meta"));
data/securefs-0.11.1+ds/sources/myutils.cpp:68:18:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int ch = getchar();
data/securefs-0.11.1+ds/sources/operations.cpp:378:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(const char* path, char* buffer, size_t len, fuse_off_t off, struct fuse_file_info* info)
data/securefs-0.11.1+ds/sources/operations.cpp:387:65:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            return static_cast<int>(fb->cast_as<RegularFile>()->read(buffer, off, len));
data/securefs-0.11.1+ds/sources/operations.cpp:775:44:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        opt->read = &securefs::operations::read;
data/securefs-0.11.1+ds/sources/operations.h:134:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int read(const char*, char*, size_t, fuse_off_t, struct fuse_file_info*);
data/securefs-0.11.1+ds/sources/streams.cpp:64:37:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                auto rc = m_stream->read(buffer.data(), off, buffer.size());
data/securefs-0.11.1+ds/sources/streams.cpp:84:37:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                auto rc = m_stream->read(hmac.data(), 0, hmac.size());
data/securefs-0.11.1+ds/sources/streams.cpp:132:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        length_type read(void* output, offset_type off, length_type len) override
data/securefs-0.11.1+ds/sources/streams.cpp:134:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            return m_stream->read(output, off + hmac_length, len);
data/securefs-0.11.1+ds/sources/streams.cpp:163:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    auto rc = m_stream->read(output, block_number * m_block_size, m_block_size);
data/securefs-0.11.1+ds/sources/streams.cpp:218:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
length_type BlockBasedStream::read(void* output, offset_type offset, length_type length)
data/securefs-0.11.1+ds/sources/streams.cpp:422:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (m_metastream.read(buffer.get(), pos, get_meta_size()) != get_meta_size())
data/securefs-0.11.1+ds/sources/streams.cpp:469:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            auto rc = m_metastream.read(buffer.get(), 0, get_encrypted_header_size());
data/securefs-0.11.1+ds/sources/streams.h:25:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    virtual length_type read(void* output, offset_type offset, length_type length) = 0;
data/securefs-0.11.1+ds/sources/streams.h:111:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    length_type read(void* output, offset_type offset, length_type length) override;
data/securefs-0.11.1+ds/sources/unix.cpp:98:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    length_type read(void* output, offset_type offset, length_type length) override
data/securefs-0.11.1+ds/sources/unix.cpp:108:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        auto rc = ::read(m_fd, output, length);
data/securefs-0.11.1+ds/sources/unix.cpp:293:24:  [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).
    m_dir_name.reserve(strlen(buffer) + 1);
data/securefs-0.11.1+ds/sources/unix.cpp:549:17:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int c = getchar();
data/securefs-0.11.1+ds/sources/win.cpp:91:28:  [1] (buffer) wcslen:
  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).
        for (ptrdiff_t i = wcslen(system_buffer) - 1; i >= 0; --i)
data/securefs-0.11.1+ds/sources/win.cpp:619:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    length_type read(void* output, offset_type offset, length_type length) override
data/securefs-0.11.1+ds/sources/win.cpp:1066:17:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int c = getchar();
data/securefs-0.11.1+ds/test/test_crypto.cpp:292:20:  [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).
                   strlen(info),
data/securefs-0.11.1+ds/test/test_crypto.cpp:308:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                               strlen(password),
data/securefs-0.11.1+ds/test/test_crypto.cpp:310:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                               strlen(salt),
data/securefs-0.11.1+ds/test/test_streams.cpp:52:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            auto read_sz = stream.read(buffer.data(), a, std::min<size_t>(b, buffer.size()));
data/securefs-0.11.1+ds/test/test_streams.cpp:53:47:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            auto posix_read_sz = posix_stream.read(
data/securefs-0.11.1+ds/test/test_streams.cpp:212:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(lite_stream.read(output, 0, sizeof(output)) == sizeof(test_data));

ANALYSIS SUMMARY:

Hits = 181
Lines analyzed = 13899 in approximately 0.40 seconds (34855 lines/second)
Physical Source Lines of Code (SLOC) = 11757
Hits@level = [0]  34 [1]  53 [2]  75 [3]   7 [4]   7 [5]  39
Hits@level+ = [0+] 215 [1+] 181 [2+] 128 [3+]  53 [4+]  46 [5+]  39
Hits/KSLOC@level+ = [0+] 18.287 [1+] 15.3951 [2+] 10.8871 [3+] 4.50795 [4+] 3.91256 [5+] 3.31717
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.