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/stockfish-11/src/material.cpp
Examining data/stockfish-11/src/tt.cpp
Examining data/stockfish-11/src/endgame.h
Examining data/stockfish-11/src/movepick.h
Examining data/stockfish-11/src/timeman.h
Examining data/stockfish-11/src/syzygy/tbprobe.cpp
Examining data/stockfish-11/src/syzygy/tbprobe.h
Examining data/stockfish-11/src/bitbase.cpp
Examining data/stockfish-11/src/pawns.h
Examining data/stockfish-11/src/thread.cpp
Examining data/stockfish-11/src/benchmark.cpp
Examining data/stockfish-11/src/evaluate.h
Examining data/stockfish-11/src/thread.h
Examining data/stockfish-11/src/uci.cpp
Examining data/stockfish-11/src/psqt.cpp
Examining data/stockfish-11/src/misc.cpp
Examining data/stockfish-11/src/movegen.h
Examining data/stockfish-11/src/uci.h
Examining data/stockfish-11/src/pawns.cpp
Examining data/stockfish-11/src/thread_win32_osx.h
Examining data/stockfish-11/src/timeman.cpp
Examining data/stockfish-11/src/main.cpp
Examining data/stockfish-11/src/search.h
Examining data/stockfish-11/src/position.h
Examining data/stockfish-11/src/search.cpp
Examining data/stockfish-11/src/evaluate.cpp
Examining data/stockfish-11/src/ucioption.cpp
Examining data/stockfish-11/src/types.h
Examining data/stockfish-11/src/movepick.cpp
Examining data/stockfish-11/src/movegen.cpp
Examining data/stockfish-11/src/material.h
Examining data/stockfish-11/src/bitboard.h
Examining data/stockfish-11/src/tt.h
Examining data/stockfish-11/src/position.cpp
Examining data/stockfish-11/src/endgame.cpp
Examining data/stockfish-11/src/bitboard.cpp
Examining data/stockfish-11/src/misc.h

FINAL RESULTS:

data/stockfish-11/src/misc.cpp:104:16:  [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).
        l.file.open(fname, ifstream::out);
data/stockfish-11/src/position.cpp:696:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(&newSt, st, offsetof(StateInfo, key));
data/stockfish-11/src/position.cpp:955:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(&newSt, st, sizeof(StateInfo));
data/stockfish-11/src/syzygy/tbprobe.cpp:108:38:  [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 union { uint32_t i; char c[4]; } Le = { 0x01020304 };
data/stockfish-11/src/syzygy/tbprobe.cpp:114:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(&v, addr, sizeof(T));
data/stockfish-11/src/syzygy/tbprobe.cpp:140: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 block[4];   // Number of block
data/stockfish-11/src/syzygy/tbprobe.cpp:141: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 offset[2];  // Offset within the block
data/stockfish-11/src/syzygy/tbprobe.cpp:197:28:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            std::ifstream::open(fname);
data/stockfish-11/src/syzygy/tbprobe.cpp:213: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 fd = ::open(fname.c_str(), O_RDONLY);
data/stockfish-11/src/tt.h:74: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 padding[2]; // Align to a divisor of the cache line size

ANALYSIS SUMMARY:

Hits = 10
Lines analyzed = 12316 in approximately 0.31 seconds (40008 lines/second)
Physical Source Lines of Code (SLOC) = 7247
Hits@level = [0]   0 [1]   0 [2]  10 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  10 [1+]  10 [2+]  10 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 1.37988 [1+] 1.37988 [2+] 1.37988 [3+]   0 [4+]   0 [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.