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/mp3fs-1.0/src/buffer.cc
Examining data/mp3fs-1.0/src/buffer.h
Examining data/mp3fs-1.0/src/codecs/coders.cc
Examining data/mp3fs-1.0/src/codecs/coders.h
Examining data/mp3fs-1.0/src/codecs/flac_decoder.cc
Examining data/mp3fs-1.0/src/codecs/flac_decoder.h
Examining data/mp3fs-1.0/src/codecs/mp3_encoder.cc
Examining data/mp3fs-1.0/src/codecs/mp3_encoder.h
Examining data/mp3fs-1.0/src/codecs/picture.cc
Examining data/mp3fs-1.0/src/codecs/picture.h
Examining data/mp3fs-1.0/src/codecs/vorbis_decoder.cc
Examining data/mp3fs-1.0/src/codecs/vorbis_decoder.h
Examining data/mp3fs-1.0/src/fuseops.cc
Examining data/mp3fs-1.0/src/lib/base64.c
Examining data/mp3fs-1.0/src/lib/base64.h
Examining data/mp3fs-1.0/src/logging.cc
Examining data/mp3fs-1.0/src/logging.h
Examining data/mp3fs-1.0/src/mp3fs.cc
Examining data/mp3fs-1.0/src/mp3fs.h
Examining data/mp3fs-1.0/src/path.cc
Examining data/mp3fs-1.0/src/path.h
Examining data/mp3fs-1.0/src/reader.h
Examining data/mp3fs-1.0/src/stats_cache.cc
Examining data/mp3fs-1.0/src/stats_cache.h
Examining data/mp3fs-1.0/src/transcode.cc
Examining data/mp3fs-1.0/src/transcode.h
Examining data/mp3fs-1.0/test/concurrent_read.cc
Examining data/mp3fs-1.0/test/fpcompare.c

FINAL RESULTS:

data/mp3fs-1.0/src/fuseops.cc:67:19:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
    ssize_t len = readlink(path.TranscodeSource().c_str(), buf, size - 2);
data/mp3fs-1.0/src/fuseops.cc:59:9:  [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(ext + 1, params.desttype);  // NOLINT
data/mp3fs-1.0/src/logging.cc:120: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(nullptr, 0, format, ap);
data/mp3fs-1.0/src/logging.cc:122: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(&buffer[0], buffer.size() + 1, format, ap2);
data/mp3fs-1.0/src/path.cc:44:17:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
            if (access(candidate.c_str(), F_OK) == 0) {
data/mp3fs-1.0/src/codecs/flac_decoder.cc:54:18:  [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* file = fopen(filename, "r");
data/mp3fs-1.0/src/codecs/vorbis_decoder.cc:55:18:  [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* file = fopen(filename, "r");
data/mp3fs-1.0/src/fuseops.cc:134: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).
        if (!trans.open()) {
data/mp3fs-1.0/src/fuseops.cc:150:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int fd = open(path.NormalSource().c_str(), fi->flags);
data/mp3fs-1.0/src/fuseops.cc:162:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!trans->open()) {
data/mp3fs-1.0/src/lib/base64.c:60:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char b64c[64] =
data/mp3fs-1.0/src/lib/base64.c:250:21:  [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 signed char b64[0x100] = {
data/mp3fs-1.0/src/lib/base64.h:38: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 buf[4];
data/mp3fs-1.0/src/logging.cc:40: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).
        logfile_.open(logfile);
data/mp3fs-1.0/src/transcode.cc:43:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
bool Transcoder::open() {
data/mp3fs-1.0/src/transcode.h:49:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    bool open();
data/mp3fs-1.0/test/concurrent_read.cc:12: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[buffer_size];
data/mp3fs-1.0/test/concurrent_read.cc:22: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(argv[1], O_RDONLY);
data/mp3fs-1.0/src/fuseops.cc:183:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t read = reader->read(buf, offset, size);
data/mp3fs-1.0/src/fuseops.cc:185:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read >= 0) {
data/mp3fs-1.0/src/fuseops.cc:186:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        return static_cast<int>(read);
data/mp3fs-1.0/src/reader.h:31:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    virtual ssize_t read(char* buff, off_t offset, size_t len) = 0;
data/mp3fs-1.0/src/reader.h:42:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t read(char* buff, off_t offset, size_t len) override {
data/mp3fs-1.0/src/transcode.cc:92:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
ssize_t Transcoder::read(char* buff, off_t offset, size_t len) {
data/mp3fs-1.0/src/transcode.h:52:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t read(char* buff, off_t offset, size_t len) override;

ANALYSIS SUMMARY:

Hits = 25
Lines analyzed = 3991 in approximately 0.12 seconds (33201 lines/second)
Physical Source Lines of Code (SLOC) = 2380
Hits@level = [0]  11 [1]   7 [2]  13 [3]   0 [4]   4 [5]   1
Hits@level+ = [0+]  36 [1+]  25 [2+]  18 [3+]   5 [4+]   5 [5+]   1
Hits/KSLOC@level+ = [0+] 15.1261 [1+] 10.5042 [2+] 7.56303 [3+] 2.10084 [4+] 2.10084 [5+] 0.420168
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.