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/vlc-plugin-bittorrent-2.11/src/data.cpp
Examining data/vlc-plugin-bittorrent-2.11/src/data.h
Examining data/vlc-plugin-bittorrent-2.11/src/download.cpp
Examining data/vlc-plugin-bittorrent-2.11/src/download.h
Examining data/vlc-plugin-bittorrent-2.11/src/libtorrent.cpp
Examining data/vlc-plugin-bittorrent-2.11/src/libtorrent.h
Examining data/vlc-plugin-bittorrent-2.11/src/magnetmetadata.cpp
Examining data/vlc-plugin-bittorrent-2.11/src/magnetmetadata.h
Examining data/vlc-plugin-bittorrent-2.11/src/metadata.cpp
Examining data/vlc-plugin-bittorrent-2.11/src/metadata.h
Examining data/vlc-plugin-bittorrent-2.11/src/module.cpp
Examining data/vlc-plugin-bittorrent-2.11/src/vlc.cpp
Examining data/vlc-plugin-bittorrent-2.11/src/vlc.h
Examining data/vlc-plugin-bittorrent-2.11/test/downloaddummy.cpp
Examining data/vlc-plugin-bittorrent-2.11/test/miniclient.cpp
Examining data/vlc-plugin-bittorrent-2.11/test/vlcdummy.c

FINAL RESULTS:

data/vlc-plugin-bittorrent-2.11/src/magnetmetadata.cpp:39:33:  [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.
MagnetMetadataControl(stream_t *access, int query, va_list args);
data/vlc-plugin-bittorrent-2.11/src/magnetmetadata.cpp:147:33:  [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.
MagnetMetadataControl(stream_t *access, int query, va_list args)
data/vlc-plugin-bittorrent-2.11/src/download.cpp:102:4:  [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, x->buffer.get() + part.start, (size_t) size);
data/vlc-plugin-bittorrent-2.11/src/magnetmetadata.cpp:90:16:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			(uint8_t *) memcpy(malloc(md->size()), md->data(), md->size()),
data/vlc-plugin-bittorrent-2.11/src/metadata.cpp:94:3:  [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 + *buf_sz - b->i_buffer, b->p_buffer, b->i_buffer);
data/vlc-plugin-bittorrent-2.11/test/downloaddummy.cpp:51:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char buf[1024];
data/vlc-plugin-bittorrent-2.11/src/data.cpp:171:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ssize_t size = p_sys->download->read(
data/vlc-plugin-bittorrent-2.11/src/download.cpp:247:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
Download::read(int file, uint64_t off, char *buf, size_t buflen)
data/vlc-plugin-bittorrent-2.11/src/download.h:223:2:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	read(int file, uint64_t off, char *buf, size_t buflen);
data/vlc-plugin-bittorrent-2.11/test/downloaddummy.cpp:52:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ssize_t r = d.read(i, total, buf, sizeof (buf));

ANALYSIS SUMMARY:

Hits = 10
Lines analyzed = 2454 in approximately 0.08 seconds (32001 lines/second)
Physical Source Lines of Code (SLOC) = 1543
Hits@level = [0]  32 [1]   4 [2]   4 [3]   0 [4]   2 [5]   0
Hits@level+ = [0+]  42 [1+]  10 [2+]   6 [3+]   2 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 27.2197 [1+] 6.48088 [2+] 3.88853 [3+] 1.29618 [4+] 1.29618 [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.